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 onevoid
remove
(SDLDefinition definition) Removes aSDLDefinition
from the definition list.void
remove
(String key, SDLDefinition definition) Removes aSDLDefinition
from a map.scalars()
types()
Methods inherited from class graphql.schema.idl.TypeDefinitionRegistry
getAllImplementationsOf, getDirectiveDefinition, getImplementationsOf, getParseOrder, getType, getType, getType, getType, getTypes, getTypesMap, hasType, isInterfaceOrUnion, isObjectType, isObjectTypeOrInterface, isPossibleType, isSubTypeOf, readOnly, schemaDefinition
-
Method Details
-
merge
Description copied from class:TypeDefinitionRegistry
This will merge these type registries together and return this one- Overrides:
merge
in 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:TypeDefinitionRegistry
Adds a a collections of definitions to the registry- Overrides:
addAll
in classTypeDefinitionRegistry
- Parameters:
definitions
- the definitions to add- Returns:
- an optional error for the first problem, typically type redefinition
-
add
Description copied from class:TypeDefinitionRegistry
Adds a definition to the registry- Overrides:
add
in classTypeDefinitionRegistry
- Parameters:
definition
- the definition to add- Returns:
- an optional error
-
remove
Description copied from class:TypeDefinitionRegistry
Removes aSDLDefinition
from the definition list.- Overrides:
remove
in classTypeDefinitionRegistry
- Parameters:
definition
- the definition to remove
-
remove
Description copied from class:TypeDefinitionRegistry
Removes aSDLDefinition
from a map.- Overrides:
remove
in classTypeDefinitionRegistry
- Parameters:
key
- the key to removedefinition
- the definition to remove
-
types
- Overrides:
types
in classTypeDefinitionRegistry
-
scalars
- Overrides:
scalars
in classTypeDefinitionRegistry
-
objectTypeExtensions
- Overrides:
objectTypeExtensions
in classTypeDefinitionRegistry
-
interfaceTypeExtensions
- Overrides:
interfaceTypeExtensions
in classTypeDefinitionRegistry
-
unionTypeExtensions
- Overrides:
unionTypeExtensions
in classTypeDefinitionRegistry
-
enumTypeExtensions
- Overrides:
enumTypeExtensions
in classTypeDefinitionRegistry
-
scalarTypeExtensions
- Overrides:
scalarTypeExtensions
in classTypeDefinitionRegistry
-
inputObjectTypeExtensions
- Overrides:
inputObjectTypeExtensions
in classTypeDefinitionRegistry
-
getSchemaExtensionDefinitions
- Overrides:
getSchemaExtensionDefinitions
in classTypeDefinitionRegistry
-
getDirectiveDefinitions
- Overrides:
getDirectiveDefinitions
in classTypeDefinitionRegistry
-