Package org.allGraphQLCases.server
Class TheSubscriptionTypeController
java.lang.Object
org.allGraphQLCases.server.TheSubscriptionTypeController
@Controller
@SchemaMapping(typeName="TheSubscriptionType")
public class TheSubscriptionTypeController
extends Object
- Author:
- generated by graphql-java-generator
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataFetchersDelegateTheSubscriptionType
protected GraphqlServerUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_if
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.if._implements
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.implements._null
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.null.allGraphQLCasesInput
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, SINP_AllFieldCasesInput_SINS input) This method loads the data for ${dataFetcher.graphQLType}.allGraphQLCasesInput.allGraphQLCasesParam
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, String id, String name, Long age, Integer integer, Date date, List<Date> dates, List<List<Double>> matrix, SINP_AllFieldCasesWithoutIdSubtypeInput_SINS oneWithoutIdSubtype, List<SINP_AllFieldCasesWithoutIdSubtypeInput_SINS> listWithoutIdSubtype) This method loads the data for ${dataFetcher.graphQLType}.allGraphQLCasesParam.enumWithReservedJavaKeywordAsValues
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.enumWithReservedJavaKeywordAsValues.This method loads the data for ${dataFetcher.graphQLType}.issue53.This method loads the data for ${dataFetcher.graphQLType}.json.This method loads the data for ${dataFetcher.graphQLType}.jsons.jsonsWithInput
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, List<Object> inputParam) This method loads the data for ${dataFetcher.graphQLType}.jsonsWithInput.listOfEnumWithReservedJavaKeywordAsValues
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.listOfEnumWithReservedJavaKeywordAsValues.objectsWithInput
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, List<Object> inputParam) This method loads the data for ${dataFetcher.graphQLType}.objectsWithInput.returnEnum
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnEnum.returnListOfEnums
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfEnums.returnListOfListOfEnums
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfListOfEnums.returnListOfMandatoryEnums
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfMandatoryEnums.returnMandatoryEnum
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, String _enum) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryEnum.returnMandatoryListOfEnums
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryListOfEnums.returnMandatoryListOfMandatoryEnums
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryListOfMandatoryEnums.subscribeNewHumanForEpisode
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, String episode) This method loads the data for ${dataFetcher.graphQLType}.subscribeNewHumanForEpisode.subscribeToAList
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscribeToAList.subscribeToAListOfScalars
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscribeToAListOfScalars.subscriptionTest
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, SINP_SubscriptionTestParam_SINS param) This method loads the data for ${dataFetcher.graphQLType}.subscriptionTest.subscriptionWithNullResponse
(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscriptionWithNullResponse.
-
Field Details
-
dataFetchersDelegateTheSubscriptionType
@Autowired protected DataFetchersDelegateTheSubscriptionType dataFetchersDelegateTheSubscriptionType -
graphqlServerUtils
-
-
Constructor Details
-
TheSubscriptionTypeController
public TheSubscriptionTypeController()
-
-
Method Details
-
subscribeNewHumanForEpisode
@SchemaMapping(field="subscribeNewHumanForEpisode") public Object subscribeNewHumanForEpisode(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("episode") String episode) This method loads the data for ${dataFetcher.graphQLType}.subscribeNewHumanForEpisode.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
subscribeToAList
@SchemaMapping(field="subscribeToAList") public Object subscribeToAList(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscribeToAList.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
subscribeToAListOfScalars
@SchemaMapping(field="subscribeToAListOfScalars") public Object subscribeToAListOfScalars(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscribeToAListOfScalars.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
issue53
@SchemaMapping(field="issue53") public Object issue53(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("date") Date date) This method loads the data for ${dataFetcher.graphQLType}.issue53.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
allGraphQLCasesInput
@SchemaMapping(field="allGraphQLCasesInput") public Object allGraphQLCasesInput(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("input") SINP_AllFieldCasesInput_SINS input) This method loads the data for ${dataFetcher.graphQLType}.allGraphQLCasesInput.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
allGraphQLCasesParam
@SchemaMapping(field="allGraphQLCasesParam") public Object allGraphQLCasesParam(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("id") String id, @Argument("name") String name, @Argument("age") Long age, @Argument("integer") Integer integer, @Argument("date") Date date, @Argument("dates") List<Date> dates, @Argument("matrix") List<List<Double>> matrix, @Argument("oneWithoutIdSubtype") SINP_AllFieldCasesWithoutIdSubtypeInput_SINS oneWithoutIdSubtype, @Argument("listWithoutIdSubtype") List<SINP_AllFieldCasesWithoutIdSubtypeInput_SINS> listWithoutIdSubtype) This method loads the data for ${dataFetcher.graphQLType}.allGraphQLCasesParam.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
subscriptionTest
@SchemaMapping(field="subscriptionTest") public Object subscriptionTest(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("param") SINP_SubscriptionTestParam_SINS param) This method loads the data for ${dataFetcher.graphQLType}.subscriptionTest.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
returnEnum
@SchemaMapping(field="returnEnum") public Object returnEnum(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnEnum.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnMandatoryEnum
@SchemaMapping(field="returnMandatoryEnum") public Object returnMandatoryEnum(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("enum") String _enum) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryEnum.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnListOfEnums
@SchemaMapping(field="returnListOfEnums") public Object returnListOfEnums(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfEnums.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnListOfMandatoryEnums
@SchemaMapping(field="returnListOfMandatoryEnums") public Object returnListOfMandatoryEnums(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfMandatoryEnums.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnListOfListOfEnums
@SchemaMapping(field="returnListOfListOfEnums") public Object returnListOfListOfEnums(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnListOfListOfEnums.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnMandatoryListOfEnums
@SchemaMapping(field="returnMandatoryListOfEnums") public Object returnMandatoryListOfEnums(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryListOfEnums.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
returnMandatoryListOfMandatoryEnums
@SchemaMapping(field="returnMandatoryListOfMandatoryEnums") public Object returnMandatoryListOfMandatoryEnums(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.returnMandatoryListOfMandatoryEnums.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
subscriptionWithNullResponse
@SchemaMapping(field="subscriptionWithNullResponse") public Object subscriptionWithNullResponse(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.subscriptionWithNullResponse.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
enumWithReservedJavaKeywordAsValues
@SchemaMapping(field="enumWithReservedJavaKeywordAsValues") public Object enumWithReservedJavaKeywordAsValues(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.enumWithReservedJavaKeywordAsValues.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
listOfEnumWithReservedJavaKeywordAsValues
@SchemaMapping(field="listOfEnumWithReservedJavaKeywordAsValues") public Object listOfEnumWithReservedJavaKeywordAsValues(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.listOfEnumWithReservedJavaKeywordAsValues.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); }
To manage enum values that are java keyword, enum values like if, else (...) are stored in enum values prefixed by _ (like _if, _else...) But this prevents the automatic mapping of spring-graphql to work. So enum values are returned as String- 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.- 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.
-
_if
@SchemaMapping(field="if") public Object _if(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.if.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
_implements
@SchemaMapping(field="implements") public Object _implements(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.implements.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
_null
@SchemaMapping(field="null") public Object _null(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) This method loads the data for ${dataFetcher.graphQLType}.null.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
json
@SchemaMapping(field="json") public Object json(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("json") Object jsonParam) This method loads the data for ${dataFetcher.graphQLType}.json.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
jsons
@SchemaMapping(field="jsons") public Object jsons(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("jsons") List<Object> jsonsParam) This method loads the data for ${dataFetcher.graphQLType}.jsons.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
jsonsWithInput
@SchemaMapping(field="jsonsWithInput") public Object jsonsWithInput(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("input") List<Object> inputParam) This method loads the data for ${dataFetcher.graphQLType}.jsonsWithInput.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-
objectsWithInput
@SchemaMapping(field="objectsWithInput") public Object objectsWithInput(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, @Argument("input") List<Object> inputParam) This method loads the data for ${dataFetcher.graphQLType}.objectsWithInput.
For optimization, this method returns a CompletableFuture. This allows to use graphql-java java-dataloader to highly optimize the number of requests to the server.
The principle is this one: The data loader collects all the data to load, avoid to load several times the same data, and allows parallel execution of the queries, if multiple queries are to be run.
You can implements this method like the sample below:@Override public CompletableFuture<List
> friends(DataFetchingEnvironment environment, DataLoader<Long, Member> dataLoader, Human origin) { List<java.lang.Long> friendIds = origin.getFriendIds(); DataLoader<java.lang.Long, CharacterImpl> dataLoader = environment.getDataLoader("Character"); return dataLoader.loadMany(friendIds); } - 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.- 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.
-