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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends SDLDefinition<?>>
SchemaParseOrderaddDefinition(T sdlDefinition) This adds a newSDLDefinitionto the orderbuildNameIndex(Map<String, List<SDLNamedDefinition<?>>> inNameOrder) private List<SDLDefinition<?>> computeIfAbsent(String location) private <T extends SDLDefinition<?>>
List<SDLDefinition<?>> definitionList(T sdlDefinition) <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().private <T extends GraphQLSchemaElement>
booleanisAssignable(T e1, Class<?>... classes) <T extends SDLDefinition<?>>
SchemaParseOrderremoveDefinition(T sdlDefinition) This removes aSDLDefinitionfrom the orderprivate IntegersortValue(GraphQLNamedSchemaElement e1, Map<String, Integer> namedSortValues) toString()
-
Field Details
-
definitionOrder
-
-
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
-
isAssignable
-
sortValue
-
buildNameIndex
-
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
-
definitionList
-
computeIfAbsent
-
toString
-