Class MutationExecutorMySchema

java.lang.Object
com.graphql_java_generator.domain.client.forum.MutationExecutorMySchema
All Implemented Interfaces:
GraphQLMutationExecutor
Direct Known Subclasses:
Mutation

@Component public class MutationExecutorMySchema extends Object implements GraphQLMutationExecutor
This class contains the methods that allows the execution of the queries or mutations that are defined in the Mutation of the GraphQL schema.
These methods allows:
  • Preparation of full requests
  • Execution of full prepared requests
  • Execution of full direct requests
  • Preparation of partial requests
  • Execution of partial prepared requests
  • Execution of partial direct requests
You'll find all the documentation on the client page doc.
Author:
generated by graphql-java-generator
See Also:
  • Constructor Details

    • MutationExecutorMySchema

      public MutationExecutorMySchema()
  • Method Details

    • execWithBindValues

      public MutationResponse execWithBindValues(String queryResponseDef, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method takes a full request definition, and executes the it against the GraphQL server. That is, the query contains the full string that follows the query/mutation/subscription keyword.
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      For instance:
       Map<String, Object> params = new HashMap<>();
       params.put("heroParam", heroParamValue);
       params.put("skip", Boolean.FALSE);
       
       MyQueryType response = myQueryType.execWithBindValues(
                      "{hero(param:?heroParam) @include(if:true) {id name @skip(if: ?skip) appearsIn friends {id name}}}",
                      params);
       Character c = response.getHero();
       
      Parameters:
      queryResponseDef - The response definition of the mutation, in the native GraphQL format (see here above). It must ommit the query/mutation/subscription keyword, and start by the first { that follows.It may contain directives, as explained in the GraphQL specs.
      parameters - The map of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map. The key is the parameter name, as defined in the query (in the above sample: heroParam is an optional parameter and skip is a mandatory one). The value is the parameter vale in its Java type (for instance a Date for the GraphQLScalarTypeDate). The parameters which value is missing in this map will no be transmitted toward the GraphQL server.
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • exec

      public MutationResponse exec(String queryResponseDef, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method takes a full request definition, and executes it against the GraphQL server. That is, the query contains the full string that follows the query/mutation/subscription keyword.
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      For instance:
       MyQueryType response = myQueryType.execWithBindValues(
                      "{hero(param:?heroParam) @include(if:true) {id name @skip(if: ?skip) appearsIn friends {id name}}}",
                      "heroParam", heroParamValue, "skip", Boolean.FALSE);
       Character c = response.getHero();
       
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above). It must ommit the query/mutation/subscription keyword, and start by the first { that follows.It may contain directives, as explained in the GraphQL specs.
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • execWithBindValues

      public MutationResponse execWithBindValues(ObjectResponse objectResponse, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method takes a full request definition, and executes it against the GraphQL server. That is, the query contains the full string that follows the query/mutation/subscription keyword.
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      For instance:
       ObjectResponse response;
       
       public void setup() {
              // Preparation of the query
              objectResponse = myQueryType.getResponseBuilder()
                              .withQueryResponseDef("{hero(param:?heroParam) @include(if:true) {id name @skip(if: ?skip) appearsIn friends {id name}}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("heroParam", heroParamValue);
       params.put("skip", Boolean.FALSE);
       // This will set the value sinceValue to the sinceParam field parameter
       MyQueryType response = queryType.execWithBindValues(objectResponse, params);
       Character c = response.getHero();
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • exec

      public MutationResponse exec(ObjectResponse objectResponse, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method takes a full request definition, and executes it against the GraphQL server. That is, the query contains the full string that follows the query/mutation/subscription keyword.
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      For instance:
       ObjectResponse response;
       
       public void setup() {
              // Preparation of the query
               objectResponse = myQueryType.getResponseBuilder()
                              .withQueryResponseDef("{hero(param:?heroParam) @include(if:true) {id name @skip(if: ?skip) appearsIn friends {id name}}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       MyQueryType response = queryType.exec(objectResponse, "heroParam", heroParamValue, "skip", Boolean.FALSE);
       Character c = response.getHero();
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getResponseBuilder

      public Builder getResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for a full request, as expected by the exec and execWithBindValues methods.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getGraphQLRequest

      public GraphQLRequest getGraphQLRequest(String fullRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for full request. For instance:
       GraphQLRequest request = new GraphQLRequest(fullRequest);
       
      Parameters:
      fullRequest - The full GraphQLRequest, as specified in the GraphQL specification
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • createBoardWithBindValues

      public Board createBoardWithBindValues(String queryResponseDef, String name, Boolean publiclyAvailable, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       Board c = myQyeryType.createBoardWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}", name,
                      publiclyAvailable, params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      name - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      publiclyAvailable - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createBoard

      public Board createBoard(String queryResponseDef, String name, Boolean publiclyAvailable, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Board c = myQyeryType.createBoard("{id name @skip(if: false) appearsIn friends {id name}}", name,
                      publiclyAvailable, "skip", Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      name - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      publiclyAvailable - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createBoardWithBindValues

      public Board createBoardWithBindValues(ObjectResponse objectResponse, String name, Boolean publiclyAvailable, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       Board ret = queryType.createBoardWithBindValues(response, name, publiclyAvailable, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      name - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      publiclyAvailable - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createBoard

      public Board createBoard(ObjectResponse objectResponse, String name, Boolean publiclyAvailable, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       Board ret = queryType.createBoard(response, name, publiclyAvailable, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      name - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      publiclyAvailable - Parameter for the createBoard field of Mutation, as defined in the GraphQL schema
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getCreateBoardResponseBuilder

      public Builder getCreateBoardResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the Board, as expected by the createBoard query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getCreateBoardGraphQLRequest

      public GraphQLRequest getCreateBoardGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the createBoard executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • createTopicWithBindValues

      public Topic createTopicWithBindValues(String queryResponseDef, TopicInput topic, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       Topic c = myQyeryType.createTopicWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}", topic,
                      params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      topic - Parameter for the createTopic field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createTopic

      public Topic createTopic(String queryResponseDef, TopicInput topic, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Topic c = myQyeryType.createTopic("{id name @skip(if: false) appearsIn friends {id name}}", topic, "skip",
                      Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      topic - Parameter for the createTopic field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createTopicWithBindValues

      public Topic createTopicWithBindValues(ObjectResponse objectResponse, TopicInput topic, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       Topic ret = queryType.createTopicWithBindValues(response, topic, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      topic - Parameter for the createTopic field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createTopic

      public Topic createTopic(ObjectResponse objectResponse, TopicInput topic, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       Topic ret = queryType.createTopic(response, topic, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      topic - Parameter for the createTopic field of Mutation, as defined in the GraphQL schema
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getCreateTopicResponseBuilder

      public Builder getCreateTopicResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the Topic, as expected by the createTopic query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getCreateTopicGraphQLRequest

      public GraphQLRequest getCreateTopicGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the createTopic executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • createPostWithBindValues

      public Post createPostWithBindValues(String queryResponseDef, PostInput post, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       Post c = myQyeryType.createPostWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}", post,
                      params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      post - Parameter for the createPost field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPost

      public Post createPost(String queryResponseDef, PostInput post, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Post c = myQyeryType.createPost("{id name @skip(if: false) appearsIn friends {id name}}", post, "skip",
                      Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      post - Parameter for the createPost field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPostWithBindValues

      public Post createPostWithBindValues(ObjectResponse objectResponse, PostInput post, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       Post ret = queryType.createPostWithBindValues(response, post, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      post - Parameter for the createPost field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPost

      public Post createPost(ObjectResponse objectResponse, PostInput post, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       Post ret = queryType.createPost(response, post, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      post - Parameter for the createPost field of Mutation, as defined in the GraphQL schema
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getCreatePostResponseBuilder

      public Builder getCreatePostResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the Post, as expected by the createPost query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getCreatePostGraphQLRequest

      public GraphQLRequest getCreatePostGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the createPost executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • createPostsWithBindValues

      public List<Post> createPostsWithBindValues(String queryResponseDef, List<PostInput> spam, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       List c = myQyeryType.createPostsWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}",
                      spam, params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      spam - Parameter for the createPosts field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPosts

      public List<Post> createPosts(String queryResponseDef, List<PostInput> spam, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       List c = myQyeryType.createPosts("{id name @skip(if: false) appearsIn friends {id name}}", spam, "skip",
                      Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      spam - Parameter for the createPosts field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPostsWithBindValues

      public List<Post> createPostsWithBindValues(ObjectResponse objectResponse, List<PostInput> spam, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       List ret = queryType.createPostsWithBindValues(response, spam, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      spam - Parameter for the createPosts field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createPosts

      public List<Post> createPosts(ObjectResponse objectResponse, List<PostInput> spam, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       List ret = queryType.createPosts(response, spam, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      spam - Parameter for the createPosts field of Mutation, as defined in the GraphQL schema
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getCreatePostsResponseBuilder

      public Builder getCreatePostsResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the Post, as expected by the createPosts query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getCreatePostsGraphQLRequest

      public GraphQLRequest getCreatePostsGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the createPosts executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • createMemberWithBindValues

      public Member createMemberWithBindValues(String queryResponseDef, MemberInput input, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       Member c = myQyeryType.createMemberWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}",
                      input, params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      input - Parameter for the createMember field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createMember

      public Member createMember(String queryResponseDef, MemberInput input, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Member c = myQyeryType.createMember("{id name @skip(if: false) appearsIn friends {id name}}", input, "skip",
                      Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      input - Parameter for the createMember field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createMemberWithBindValues

      public Member createMemberWithBindValues(ObjectResponse objectResponse, MemberInput input, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       Member ret = queryType.createMemberWithBindValues(response, input, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      input - Parameter for the createMember field of Mutation, as defined in the GraphQL schema
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • createMember

      public Member createMember(ObjectResponse objectResponse, MemberInput input, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       Member ret = queryType.createMember(response, input, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      input - Parameter for the createMember field of Mutation, as defined in the GraphQL schema
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • getCreateMemberResponseBuilder

      public Builder getCreateMemberResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the Member, as expected by the createMember query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • getCreateMemberGraphQLRequest

      public GraphQLRequest getCreateMemberGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the createMember executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • __typenameWithBindValues

      public String __typenameWithBindValues(String queryResponseDef, Map<String,Object> parameters) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       Map<String, Object> params = new HashMap<>();
       params.put("skip", Boolean.FALSE);
      
       String c = myQyeryType.__typenameWithBindValues("{id name @skip(if: false) appearsIn friends {id name}}",
                      params);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • __typename

      public String __typename(String queryResponseDef, Object... paramsAndValues) throws GraphQLRequestExecutionException, GraphQLRequestPreparationException
      This method executes a partial query against the GraphQL server. That is, the query that is one of the queries defined in the GraphQL query object. The queryResponseDef contains the part of the query that is after the query name.
      For instance, if the query hero has one parameter (as defined in the GraphQL schema):
       String c = myQyeryType.__typename("{id name @skip(if: false) appearsIn friends {id name}}", "skip",
                      Boolean.FALSE);
       
      It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method takes care of writing the query name, and the parameter(s) for the query. The given queryResponseDef describes the format of the response of the server response, that is the expected fields of the Character GraphQL type. It can be something like "{ id name }", if you want these fields of this type. Please take a look at the StarWars, Forum and other samples for more complex queries.
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Parameters:
      queryResponseDef - The response definition of the query, in the native GraphQL format (see here above)
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestPreparationException - When an error occurs during the request preparation, typically when building the ObjectResponse
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • __typenameWithBindValues

      public String __typenameWithBindValues(ObjectResponse objectResponse, Map<String,Object> parameters) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       Map<String, Object> params = new HashMap<>();
       params.put("sinceParam", sinceValue);
       // This will set the value sinceValue to the sinceParam field parameter
       String ret = queryType.__typenameWithBindValues(response, params);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      parameters - The list of values, for the bind variables defined in the query. If there is no bind variable in the defined Query, this argument may be null or an empty Map
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • __typename

      public String __typename(ObjectResponse objectResponse, Object... paramsAndValues) throws GraphQLRequestExecutionException
      This method is expected by the graphql-java framework. It will be called when this query is called. It offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
      This method is valid for queries/mutations/subscriptions which don't have bind variables, as there is no parameters argument to pass the list of values.
      Here is a sample:
       ObjectResponse response;
       public void setup() {
              // Preparation of the query
              response = queryType.getBoardsResponseBuilder()
                              .withQueryResponseDef("{id name publiclyAvailable topics(since:?sinceParam){id}}").build();
       }
       
       public void doTheJob() {
       ..
       // This will set the value sinceValue to the sinceParam field parameter
       String ret = queryType.__typename(response, "sinceParam", sinceValue);
       ...
       }
       
      Parameters:
      objectResponse - The definition of the response format, that describes what the GraphQL server is expected to return
      paramsAndValues - This parameter contains all the name and values for the Bind Variables defined in the objectResponse parameter, that must be sent to the server. Optional parameter may not have a value. They will be ignored and not sent to the server. Mandatory parameter must be provided in this argument.
      This parameter contains an even number of parameters: it must be a series of name and values : (paramName1, paramValue1, paramName2, paramValue2...)
      Throws:
      GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed
    • get__typenameResponseBuilder

      public Builder get__typenameResponseBuilder() throws GraphQLRequestPreparationException
      Get the Builder for the String, as expected by the __typename query.
      Returns:
      Throws:
      GraphQLRequestPreparationException
    • get__typenameGraphQLRequest

      public GraphQLRequest get__typenameGraphQLRequest(String partialRequest) throws GraphQLRequestPreparationException
      Get the GraphQLRequest for the __typename executor, created with the given Partial request.
      Parameters:
      partialRequest - The Partial GraphQLRequest, as explained in the plugin client documentation
      Returns:
      Throws:
      GraphQLRequestPreparationException