interface GraphQLTypeManager
An interface for handling type conversion and creation with GraphQL. Implementations must handle circular query type creations. It is expected subsequent calls to getType, getEnumType, getMutationType, and getQueryType will return the same instance (cached).
Type Params | Return Type | Name and description |
---|---|---|
|
abstract graphql.schema.GraphQLTypeReference |
createReference(org.grails.datastore.mapping.model.PersistentEntity entity, GraphQLPropertyType type) Creates a reference to domain type |
|
abstract graphql.schema.GraphQLCodeRegistry$Builder |
getCodeRegistry() @return |
|
abstract graphql.schema.GraphQLType |
getEnumType(java.lang.Class<? extends java.lang.Enum> clazz, boolean nullable) Retrieves an enum type for the provided class |
|
abstract graphql.schema.GraphQLInputType |
getMutationType(org.grails.datastore.mapping.model.PersistentEntity entity, GraphQLPropertyType type, boolean nullable) Retrieves a GraphQL type used for mutations that represents the provided entity |
|
abstract GraphQLEntityNamingConvention |
getNamingConvention()
|
|
abstract graphql.schema.GraphQLOutputType |
getQueryType(org.grails.datastore.mapping.model.PersistentEntity entity, GraphQLPropertyType type) Retrieves a GraphQL type used for queries that represents the provided entity |
|
abstract graphql.schema.GraphQLType |
getType(java.lang.Class clazz) Retrieves the corresponding GraphQL type for the specified class. |
|
abstract graphql.schema.GraphQLType |
getType(java.lang.Class clazz, boolean nullable) Retrieves the corresponding GraphQL type for the specified class. |
|
abstract boolean |
hasType(java.lang.Class clazz) Retrieves whether or not a GraphQL type has been registered for the provided class |
|
abstract void |
registerType(java.lang.Class clazz, graphql.schema.GraphQLType type) Register a GraphQL type to represent the provided class |
Creates a reference to domain type
entity
- The entity to referencetype
- The type of reference@return
Retrieves an enum type for the provided class
clazz
- The clazz to createnullable
- True if the property allows nullsRetrieves a GraphQL type used for mutations that represents the provided entity
entity
- The persistent entity to retrieve the type fortype
- The type of property to retrievenullable
- True if the property allows nulls
Retrieves a GraphQL type used for queries that represents the provided entity
entity
- The persistent entity to retrieve the type fortype
- The type of property to retrieveRetrieves the corresponding GraphQL type for the specified class. This method should typically return a graphql.schema.GraphQLScalarType Implementations must include support for converting primitive types to their respective class types (long -> Long, byte[] -> Byte[]).
clazz
- The class to retrieve a type forRetrieves the corresponding GraphQL type for the specified class. This method should typically return a graphql.schema.GraphQLScalarType
clazz
- The class to retrieve a type fornullable
- If true, wrap the normal result with a graphql.schema.GraphQLNonNullRetrieves whether or not a GraphQL type has been registered for the provided class
clazz
- The class to search for a type forRegister a GraphQL type to represent the provided class
clazz
- The class the type representstype
- The type