sorters

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortArguments

func SortArguments(nodes []*ast.Argument)

SortArguments sorts an array of argument nodes in-place by name.

func SortDirectiveDefinitions

func SortDirectiveDefinitions(nodes []*ast.DirectiveDefinition)

SortDirectiveDefinitions sorts an array of directives in-place by name. This does not sort each directives' input values, use `SortDirectiveDefinitionsInputValues` to sort input values.

func SortDirectiveDefinitionsInputValues

func SortDirectiveDefinitionsInputValues(nodes ...*ast.DirectiveDefinition)

SortDirectiveDefinitionsInputValues will sort each directive definition's input values in-place by name.

func SortDirectiveDefinitionsMap

func SortDirectiveDefinitionsMap(all map[string]*ast.DirectiveDefinition) []*ast.DirectiveDefinition

SortDirectiveDefinitionsMap will sort a map of directive definitions by name and return a newly created slice. This does not sort each directives definition's input values, use `SortDirectiveDefinitionsInputValues` to sort input values.

func SortDirectives

func SortDirectives(nodes []*ast.Directive)

SortDirectives sorts an array of directives in-place by name. This does not sort each directives' arguments, use `SortDirectivesArguments` to sort arguments.

func SortDirectivesArguments

func SortDirectivesArguments(nodes ...*ast.Directive)

SortDirectivesArguments will sort each directive's arguments in-place by name.

func SortDirectivesMap

func SortDirectivesMap(all map[string]*ast.Directive) []*ast.Directive

SortDirectivesMap will sort a map of directives by name and return a newly created slice. This does not sort each directive's arguments, use `SortDirectivesArguments` to sort arguments.

func SortEnumValues

func SortEnumValues(enumValues []*ast.EnumValueDefinition)

SortEnumValues sorts an an array of enum values in-place by name.

func SortEnums

func SortEnums(enums []*ast.EnumDefinition)

SortEnums sorts an array of enums in-place by name, and also all of each enum's values by name.

func SortEnumsMap

func SortEnumsMap(all map[string]*ast.EnumDefinition) []*ast.EnumDefinition

SortEnumsMap will sort a map of enums by name and return a newly created slice. This also sorts each enum's values by name.

func SortExtensions

func SortExtensions(nodes []*ast.TypeExtensionDefinition)

SortExtensions sorts an array of type extensions in-place by definition name. This does not sort each definition's fields, use `SortExtensionsFields` to sort definition fields.

func SortExtensionsFields

func SortExtensionsFields(nodes ...*ast.TypeExtensionDefinition)

SortExtensionsFields will sort each extension's definition's fields in-place by name.

func SortExtensionsMap

func SortExtensionsMap(all map[string]*ast.TypeExtensionDefinition) []*ast.TypeExtensionDefinition

SortExtensionsMap will sort a map of extensions by name and return a newly created slice. This does not sort each interface's fields, use `SortExtensionsFields` to sort fields.

func SortFields

func SortFields(nodes []*ast.FieldDefinition)

SortFields sorts an array of fields in-place by name.

func SortFieldsMap

func SortFieldsMap(all map[string]*ast.FieldDefinition) []*ast.FieldDefinition

SortFieldsMap will sort a map of fields by name and return a newly created slice.

func SortInputObjects

func SortInputObjects(nodes []*ast.InputObjectDefinition)

SortInputObjects sorts an array of input objects in-place by name. This does not sort each input object's input values, use `SortInputObjectsFields` to sort input values.

func SortInputObjectsFields

func SortInputObjectsFields(nodes ...*ast.InputObjectDefinition)

SortInputObjectsFields will sort each input object's fields in-place by name.

func SortInputObjectsMap

func SortInputObjectsMap(all map[string]*ast.InputObjectDefinition) []*ast.InputObjectDefinition

SortInputObjectsMap will sort a map of objects by name and return a newly created slice. This does not sort each input object's input values, use `SortInputObjectsFields` to sort input values.

func SortInputValues

func SortInputValues(nodes []*ast.InputValueDefinition)

SortInputValues sorts an array of input values in-place by name.

func SortInterfaces

func SortInterfaces(nodes []*ast.InterfaceDefinition)

SortInterfaces sorts an array of unions in-place by name. This does not sort each interface's fields, use `SortInterfacesFields` to sort fields.

func SortInterfacesFields

func SortInterfacesFields(nodes ...*ast.InterfaceDefinition)

SortInterfacesFields will sort each interface's fields in-place by name.

func SortInterfacesMap

func SortInterfacesMap(all map[string]*ast.InterfaceDefinition) []*ast.InterfaceDefinition

SortInterfacesMap will sort a map of unions by name and return a newly created slice. This does not sort each interface's fields, use `SortInterfacesFields` to sort fields.

func SortNamed

func SortNamed(nodes []*ast.Named)

SortNamed sorts an array of named nodes in-place by name.

func SortObjects

func SortObjects(nodes []*ast.ObjectDefinition)

SortObjects sorts an an array of objects in-place by name. This does not also sort fields, use `SortObjectFields` to get sorted fields.

func SortObjectsFields

func SortObjectsFields(objs ...*ast.ObjectDefinition)

SortObjectsFields sorts the fields of each object in-place.

func SortObjectsMap

func SortObjectsMap(all map[string]*ast.ObjectDefinition) []*ast.ObjectDefinition

SortObjectsMap will sort a map of objects by name and return a newly created slice. This will not sort the fields by name, use `SortObjectFields` to get sorted fields.

func SortScalars

func SortScalars(scalars []*ast.ScalarDefinition)

SortScalars sorts an array of scalars in-place by name.

func SortScalarsMap

func SortScalarsMap(all map[string]*ast.ScalarDefinition) []*ast.ScalarDefinition

SortScalarsMap will sort a map of scalars by name and return a newly created slice.

func SortUnions

func SortUnions(nodes []*ast.UnionDefinition)

SortUnions sorts an array of unions in-place by name. This does not sort each union's set of values, use `SortUnionsValues` to sort values.

func SortUnionsMap

func SortUnionsMap(all map[string]*ast.UnionDefinition) []*ast.UnionDefinition

SortUnionsMap will sort a map of unions by name and return a newly created slice. This does not sort each union's set of values, use `SortUnionsValues` to sort values.

func SortUnionsValues

func SortUnionsValues(nodes ...*ast.UnionDefinition)

SortUnionsValues will sort each union's values in-place by name.

func SortValue

func SortValue(raw ast.Value)

SortValue sorts a value

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL