@groovy.transform.CompileStatic abstract class CustomOperation
This class stores data about custom query operations that users provide in the mapping of the entity.
Type | Name and description |
---|---|
DataFetcher |
dataFetcher |
boolean |
defaultListArguments |
OperationType |
operationType |
Type Params | Return Type | Name and description |
---|---|---|
|
CustomOperation |
argument(java.lang.String name, java.util.List<java.lang.Class> type, groovy.lang.Closure closure = null) Creates an argument to the operation that is a list of a simple type. |
|
CustomOperation |
argument(java.lang.String name, java.lang.Class type, groovy.lang.Closure closure = null) Creates an argument to the operation that is of the returnType provided. |
|
CustomOperation |
argument(java.lang.String name, java.lang.String typeName, groovy.lang.Closure closure) Creates an argument to the operation that is a custom type. |
|
protected DataFetcher |
buildDataFetcher(PersistentEntity entity, GraphQLServiceManager serviceManager) |
|
Builder |
createField(PersistentEntity entity, GraphQLServiceManager serviceManager, MappingContext mappingContext, java.util.Map<java.lang.String, GraphQLInputType> listArguments) Creates the field to be added to the query or mutation returnType in the schema. |
|
T |
dataFetcher(DataFetcher dataFetcher) |
|
CustomOperation |
defaultListArguments(boolean useDefaultListArguments = true) 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 GraphQLOutputType |
getType(GraphQLTypeManager typeManager, MappingContext mappingContext) |
|
void |
validate() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates an argument to the operation that is a list of a simple type. The list can not have more than 1 element and that element must be a class.
name
- The name of the argumenttype
- The returnType of the argumentclosure
- To provide additional data about the argumentCreates an argument to the operation that is of the returnType provided.
name
- The name of the argumenttype
- The returnType of the argumentclosure
- To provide additional data about the argumentCreates an argument to the operation that is a custom type.
name
- The name of the argumentclosure
- To provide additional data about the argumentCreates 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 contextIf 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