Package graphql.schema.idl
Class SchemaParseOrder
java.lang.Object
graphql.schema.idl.SchemaParseOrder
- All Implemented Interfaces:
Serializable
This class will track what order
SDLDefinition were parsed in
via SchemaParser and TypeDefinitionRegistry- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends SDLDefinition<?>>
SchemaParseOrderaddDefinition(T sdlDefinition) This adds a newSDLDefinitionto the order<T extends GraphQLSchemaElement>
Comparator<? super T> This comparator will sort according to the original parsed orderMap<String, List<SDLNamedDefinition<?>>> This map is the order in whichSDLDefinitions were parsed per uniqueSourceLocation.getSourceName()and it only containsSDLNamedDefinitions.Map<String, List<SDLDefinition<?>>> This map is the order in whichSDLDefinitions were parsed per uniqueSourceLocation.getSourceName().<T extends SDLDefinition<?>>
SchemaParseOrderremoveDefinition(T sdlDefinition) This removes aSDLDefinitionfrom the ordertoString()
-
Constructor Details
-
SchemaParseOrder
public SchemaParseOrder()
-
-
Method Details
-
getInOrder
This map is the order in whichSDLDefinitions were parsed per uniqueSourceLocation.getSourceName(). If there is no source then the empty string "" is used.- Returns:
- a map of source names to definitions in parsed order
-
getInNameOrder
This map is the order in whichSDLDefinitions were parsed per uniqueSourceLocation.getSourceName()and it only containsSDLNamedDefinitions. If there is no source then the empty string "" is used.- Returns:
- a map of source names to definitions in parsed order
-
getElementComparator
This comparator will sort according to the original parsed order- Type Parameters:
T- is aGraphQLSchemaElement- Returns:
- a comparator that sorts schema elements in parsed order
-
addDefinition
This adds a newSDLDefinitionto the order- Type Parameters:
T- for two- Parameters:
sdlDefinition- the SDL definition to add- Returns:
- this
SchemaParseOrderfor fluent building
-
removeDefinition
This removes aSDLDefinitionfrom the order- Type Parameters:
T- for two- Parameters:
sdlDefinition- the SDL definition to remove- Returns:
- this
SchemaParseOrderfor fluent building
-
toString
-