@CompileStatic abstract class CustomOperation<T> extends java.lang.Object implements Arguable<T>, Deprecatable<T>, Describable<T>, ExecutesClosures, Named<T>
This class stores data about custom query operations that users provide in the mapping of the entity.
| Type | Name and description |
|---|---|
graphql.schema.DataFetcher |
dataFetcher |
boolean |
defaultListArguments |
OperationType |
operationType |
| Constructor and description |
|---|
CustomOperation() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected graphql.schema.DataFetcher |
buildDataFetcher(PersistentEntity entity, GraphQLServiceManager serviceManager) |
|
graphql.schema.GraphQLFieldDefinition$Builder |
createField(PersistentEntity entity, GraphQLServiceManager serviceManager, MappingContext mappingContext, java.util.Map<java.lang.String, graphql.schema.GraphQLInputType> listArguments, java.lang.String parentTypeName)Creates the field to be added to the query or mutation returnType in the schema. |
|
T |
dataFetcher(graphql.schema.DataFetcher<?> dataFetcher) |
|
CustomOperation |
defaultListArguments(boolean useDefaultListArguments)If the argument is true, the default list arguments created in the schema through configuration will be prepended to any other arguments defined for the operation. |
|
protected abstract graphql.schema.GraphQLOutputType |
getType(GraphQLTypeManager typeManager, MappingContext mappingContext) |
|
void |
validate() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Creates the field to be added to the query or mutation returnType in the schema.
entity - The persistent entity the operation belongs totypeManager - The returnType managerinterceptorManager - The interceptor manager to be used for executing
interceptors with the custom data fetchermappingContext - The mapping contextlistArguments - The default list arguments to prepend, keyed by argument nameparentTypeName - The name of the Query or Mutation type this field is added to,
used to register the data fetcher in the code registryIf the argument is true, the default list arguments created in the schema through configuration will be prepended to any other arguments defined for the operation. (max, offset, sort, order, etc..)
useDefaultListArguments - Whether to use the default list args