Class AllFieldCasesController
java.lang.Object
org.junittest.allgraphqlcases_server_springconfiguration_util_batchmapping_collection.util.AllFieldCasesController
@Controller
@SchemaMapping(typeName="AllFieldCases")
public class AllFieldCasesController
extends Object
- Author:
- generated by graphql-java-generator
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataFetchersDelegateAllFieldCases
protected com.graphql_java_generator.server.util.GraphqlServerUtils
-
Constructor Summary
ConstructorsConstructorDescriptionAllFieldCasesController
(org.springframework.graphql.execution.BatchLoaderRegistry registry) -
Method Summary
Modifier and TypeMethodDescription_break
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, String _if) This method loads the data for ${dataFetcher.graphQLType}.break.age
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, String unit) This method loads the data for ${dataFetcher.graphQLType}.age.aliases
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.aliases.booleans
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.booleans.comments
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.comments.dates
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.dates.forname
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, Boolean uppercase, String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.forname.friends
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.friends.issue65
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, List<FieldParameterInput> inputs) This method loads the data for ${dataFetcher.graphQLType}.issue65.issue66
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCases> dataLoader, AllFieldCases origin, List<AllFieldCasesInput> input) This method loads the data for ${dataFetcher.graphQLType}.issue66.listWithIdSubTypes
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCasesWithIdSubtype> dataLoader, AllFieldCases origin, Long nbItems, Date date, List<Date> dates, Boolean uppercaseName, String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.listWithIdSubTypes.listWithoutIdSubTypes
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, Long nbItems, FieldParameterInput input, String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.listWithoutIdSubTypes.matrix
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.matrix.oneWithIdSubType
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCasesWithIdSubtype> dataLoader, AllFieldCases origin, Boolean uppercase) This method loads the data for ${dataFetcher.graphQLType}.oneWithIdSubType.oneWithoutFieldParameter
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.oneWithoutFieldParameter.oneWithoutIdSubType
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, FieldParameterInput input) This method loads the data for ${dataFetcher.graphQLType}.oneWithoutIdSubType.planets
(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.planets.
-
Field Details
-
dataFetchersDelegateAllFieldCases
-
graphqlServerUtils
@Autowired protected com.graphql_java_generator.server.util.GraphqlServerUtils graphqlServerUtils
-
-
Constructor Details
-
AllFieldCasesController
public AllFieldCasesController(org.springframework.graphql.execution.BatchLoaderRegistry registry)
-
-
Method Details
-
forname
@SchemaMapping(field="forname") public Object forname(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("uppercase") Boolean uppercase, @Argument("textToAppendToTheForname") String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.forname. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.uppercase
- The parameter that will receive the field argument of the same name for the current data to fetchtextToAppendToTheForname
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
_break
@SchemaMapping(field="break") public Object _break(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("if") String _if) This method loads the data for ${dataFetcher.graphQLType}.break. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query._if
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
age
@SchemaMapping(field="age") public Object age(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("unit") String unit) This method loads the data for ${dataFetcher.graphQLType}.age. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.unit
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
dates
@BatchMapping(field="dates") public Collection<Date> dates(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.dates. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the dates field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
comments
@BatchMapping(field="comments") public Collection<String> comments(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.comments. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the comments field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
booleans
@BatchMapping(field="booleans") public Collection<Boolean> booleans(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.booleans. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the booleans field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
aliases
@BatchMapping(field="aliases") public Collection<String> aliases(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.aliases. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the aliases field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
planets
@BatchMapping(field="planets") public Collection<String> planets(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.planets. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the planets field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
friends
@BatchMapping(field="friends") public Collection<Human> friends(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.friends. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the friends field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
matrix
@BatchMapping(field="matrix") public Collection<Double> matrix(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.matrix. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the matrix field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
oneWithoutFieldParameter
@BatchMapping(field="oneWithoutFieldParameter") public Collection<AllFieldCasesWithIdSubtype> oneWithoutFieldParameter(org.dataloader.BatchLoaderEnvironment batchLoaderEnvironment, graphql.GraphQLContext graphQLContext, List<AllFieldCases> keys) This methods loads the data for ${dataFetcher.graphQLType}.oneWithoutFieldParameter. It is generated as thegenerateBatchMappingDataFetchers
plugin parameter is true.- Parameters:
batchLoaderEnvironment
- The environement for this batch loaded. You can extract the GraphQLContext from this parameter.graphQLContext
-keys
- The objects for which the value for the oneWithoutFieldParameter field must be retrieved.- Returns:
- This method returns
${dataFetcher.batchMappingReturnType.value}
, as defined by thebatchMappingDataFetcherReturnType
plugin parameter.
Please look at the spring-graphql annotation for a documentation on how to return the proper values
-
oneWithIdSubType
@SchemaMapping(field="oneWithIdSubType") public Object oneWithIdSubType(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCasesWithIdSubtype> dataLoader, AllFieldCases origin, @Argument("uppercase") Boolean uppercase) This method loads the data for ${dataFetcher.graphQLType}.oneWithIdSubType. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherdataLoader
- TheDataLoader
allows to load several data in one query. It allows to solve the (n+1) queries issues, and greatly optimizes the response time.
You'll find more informations here: https://github.com/graphql-java/java-dataloaderorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.uppercase
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
listWithIdSubTypes
@SchemaMapping(field="listWithIdSubTypes") public Object listWithIdSubTypes(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCasesWithIdSubtype> dataLoader, AllFieldCases origin, @Argument("nbItems") Long nbItems, @Argument("date") Date date, @Argument("dates") List<Date> dates, @Argument("uppercaseName") Boolean uppercaseName, @Argument("textToAppendToTheForname") String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.listWithIdSubTypes. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherdataLoader
- TheDataLoader
allows to load several data in one query. It allows to solve the (n+1) queries issues, and greatly optimizes the response time.
You'll find more informations here: https://github.com/graphql-java/java-dataloaderorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.nbItems
- The parameter that will receive the field argument of the same name for the current data to fetchdate
- The parameter that will receive the field argument of the same name for the current data to fetchdates
- The parameter that will receive the field argument of the same name for the current data to fetchuppercaseName
- The parameter that will receive the field argument of the same name for the current data to fetchtextToAppendToTheForname
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
oneWithoutIdSubType
@SchemaMapping(field="oneWithoutIdSubType") public Object oneWithoutIdSubType(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("input") FieldParameterInput input) This method loads the data for ${dataFetcher.graphQLType}.oneWithoutIdSubType. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.input
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
listWithoutIdSubTypes
@SchemaMapping(field="listWithoutIdSubTypes") public Object listWithoutIdSubTypes(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("nbItems") Long nbItems, @Argument("input") FieldParameterInput input, @Argument("textToAppendToTheForname") String textToAppendToTheForname) This method loads the data for ${dataFetcher.graphQLType}.listWithoutIdSubTypes. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.nbItems
- The parameter that will receive the field argument of the same name for the current data to fetchinput
- The parameter that will receive the field argument of the same name for the current data to fetchtextToAppendToTheForname
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
issue65
@SchemaMapping(field="issue65") public Object issue65(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, AllFieldCases origin, @Argument("inputs") List<FieldParameterInput> inputs) This method loads the data for ${dataFetcher.graphQLType}.issue65. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.inputs
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-
issue66
@SchemaMapping(field="issue66") public Object issue66(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, org.dataloader.DataLoader<UUID, AllFieldCases> dataLoader, AllFieldCases origin, @Argument("input") List<AllFieldCasesInput> input) This method loads the data for ${dataFetcher.graphQLType}.issue66. It returns an Object: the data fetcher implementation may return any type that is accepted by a spring-graphql controller- Parameters:
dataFetchingEnvironment
- The GraphQLDataFetchingEnvironment
. It gives you access to the full GraphQL context for this DataFetcherdataLoader
- TheDataLoader
allows to load several data in one query. It allows to solve the (n+1) queries issues, and greatly optimizes the response time.
You'll find more informations here: https://github.com/graphql-java/java-dataloaderorigin
- The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the author attribute of the origin, which is an instance of {ObjectType {name:Post, fields:{Field{name:id, type:ID!, params:[]},Field{name:date, type:Date!, params:[]},Field{name:author, type:Member, params:[]},Field{name:publiclyAvailable, type:Boolean, params:[]},Field{name:title, type:String!, params:[]},Field{name:content, type:String!, params:[]},Field{name:authorId, type:ID, params:[]},Field{name:topicId, type:ID, params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.input
- The parameter that will receive the field argument of the same name for the current data to fetch- Returns:
- It may return any value that is valid for a spring-graphql controller, annotated by
the
@SchemaMapping
annotation - Throws:
NoSuchElementException
- This method may return aNoSuchElementException
exception. In this case, the exception is trapped by the calling method, and the return is consider as null. This allows to use theOptional.get()
method directly, without caring of whether or not there is a value. The generated code will take care of theNoSuchElementException
exception.
-