Package graphql.schema.idl
Class ImmutableTypeDefinitionRegistry
java.lang.Object
graphql.schema.idl.TypeDefinitionRegistry
graphql.schema.idl.ImmutableTypeDefinitionRegistry
- All Implemented Interfaces:
Serializable
A
ImmutableTypeDefinitionRegistry contains an immutable set of type definitions that come from compiling
a graphql schema definition file via SchemaParser.parse(String) and is more performant because it
uses ImmutableMap structures.- See Also:
-
Field Summary
Fields inherited from class graphql.schema.idl.TypeDefinitionRegistry
directiveDefinitions, enumTypeExtensions, inputObjectTypeExtensions, interfaceTypeExtensions, objectTypeExtensions, scalarTypeExtensions, scalarTypes, schema, schemaExtensionDefinitions, schemaParseOrder, types, unionTypeExtensions -
Method Summary
Modifier and TypeMethodDescriptionadd(SDLDefinition definition) Adds a definition to the registryaddAll(Collection<SDLDefinition> definitions) Adds a a collections of definitions to the registrymerge(TypeDefinitionRegistry typeRegistry) This will merge these type registries together and return this onevoidremove(SDLDefinition definition) Removes aSDLDefinitionfrom the definition list.voidremove(String key, SDLDefinition definition) Removes aSDLDefinitionfrom a map.scalars()types()Methods inherited from class graphql.schema.idl.TypeDefinitionRegistry
getAllImplementationsOf, getDirectiveDefinition, getImplementationsOf, getParseOrder, getType, getType, getType, getType, getTypeOrNull, getTypeOrNull, getTypeOrNull, getTypeOrNull, getTypes, getTypesMap, hasType, hasType, isInterfaceOrUnion, isObjectType, isObjectTypeOrInterface, isPossibleType, isSubTypeOf, readOnly, schemaDefinition
-
Method Details
-
merge
Description copied from class:TypeDefinitionRegistryThis will merge these type registries together and return this one- Overrides:
mergein classTypeDefinitionRegistry- Parameters:
typeRegistry- the registry to be merged into this one- Returns:
- this registry
- Throws:
SchemaProblem- if there are problems merging the types such as redefinitions
-
addAll
Description copied from class:TypeDefinitionRegistryAdds a a collections of definitions to the registry- Overrides:
addAllin classTypeDefinitionRegistry- Parameters:
definitions- the definitions to add- Returns:
- an optional error for the first problem, typically type redefinition
-
add
Description copied from class:TypeDefinitionRegistryAdds a definition to the registry- Overrides:
addin classTypeDefinitionRegistry- Parameters:
definition- the definition to add- Returns:
- an optional error
-
remove
Description copied from class:TypeDefinitionRegistryRemoves aSDLDefinitionfrom the definition list.- Overrides:
removein classTypeDefinitionRegistry- Parameters:
definition- the definition to remove
-
remove
Description copied from class:TypeDefinitionRegistryRemoves aSDLDefinitionfrom a map.- Overrides:
removein classTypeDefinitionRegistry- Parameters:
key- the key to removedefinition- the definition to remove
-
types
- Overrides:
typesin classTypeDefinitionRegistry
-
scalars
- Overrides:
scalarsin classTypeDefinitionRegistry
-
objectTypeExtensions
- Overrides:
objectTypeExtensionsin classTypeDefinitionRegistry
-
interfaceTypeExtensions
- Overrides:
interfaceTypeExtensionsin classTypeDefinitionRegistry
-
unionTypeExtensions
- Overrides:
unionTypeExtensionsin classTypeDefinitionRegistry
-
enumTypeExtensions
- Overrides:
enumTypeExtensionsin classTypeDefinitionRegistry
-
scalarTypeExtensions
- Overrides:
scalarTypeExtensionsin classTypeDefinitionRegistry
-
inputObjectTypeExtensions
- Overrides:
inputObjectTypeExtensionsin classTypeDefinitionRegistry
-
getSchemaExtensionDefinitions
- Overrides:
getSchemaExtensionDefinitionsin classTypeDefinitionRegistry
-
getDirectiveDefinitions
- Overrides:
getDirectiveDefinitionsin classTypeDefinitionRegistry
-