Class MutationTypeReactiveExecutorMySchema
java.lang.Object
org.junittest.starwars_client_springconfiguration.MutationTypeReactiveExecutorMySchema
- All Implemented Interfaces:
GraphQLMutationReactiveExecutor
@Component
public class MutationTypeReactiveExecutorMySchema
extends Object
implements GraphQLMutationReactiveExecutor
This class contains the methods that allows the execution of the queries or mutations that are defined in the MutationType
of the GraphQL schema. All the methods for this executor are in spring reactive, that is: they return a
These methods allows:
Mono.These methods allows:
- Preparation of full requests
- Execution of prepared full requests
- Execution of direct full direct requests
- Preparation of partial requests
- Execution of prepared partial requests
- Execution of direct partial requests
- Author:
- generated by graphql-java-generator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__typename(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Object... paramsAndValues) This method is expected by the graphql-java framework.__typename(String queryResponseDef, Object... paramsAndValues) This method executes a partial query against the GraphQL server.__typenameWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Map<String, Object> parameters) This method is expected by the graphql-java framework.__typenameWithBindValues(String queryResponseDef, Map<String, Object> parameters) This method executes a partial query against the GraphQL server.addFriend(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String idCharacter, String idNewFriend, Object... paramsAndValues) This method is expected by the graphql-java framework.addFriend(String queryResponseDef, String idCharacter, String idNewFriend, Object... paramsAndValues) This method executes a partial query against the GraphQL server.addFriendWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String idCharacter, String idNewFriend, Map<String, Object> parameters) This method is expected by the graphql-java framework.addFriendWithBindValues(String queryResponseDef, String idCharacter, String idNewFriend, Map<String, Object> parameters) This method executes a partial query against the GraphQL server.createHuman(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, String homePlanet, Object... paramsAndValues) This method is expected by the graphql-java framework.createHuman(String queryResponseDef, String name, String homePlanet, Object... paramsAndValues) This method executes a partial query against the GraphQL server.createHumanWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, String homePlanet, Map<String, Object> parameters) This method is expected by the graphql-java framework.createHumanWithBindValues(String queryResponseDef, String name, String homePlanet, Map<String, Object> parameters) This method executes a partial query against the GraphQL server.reactor.core.publisher.Mono<MutationType>exec(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Object... paramsAndValues) This method takes a full request definition, and executes it against the GraphQL server.reactor.core.publisher.Mono<MutationType>This method takes a full request definition, and executes it against the GraphQL server.reactor.core.publisher.Mono<MutationType>execWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Map<String, Object> parameters) This method takes a full request definition, and executes it against the GraphQL server.reactor.core.publisher.Mono<MutationType>execWithBindValues(String queryResponseDef, Map<String, Object> parameters) This method takes a full request definition, and executes it against the GraphQL server.get__typenameGraphQLRequest(String partialRequest) Get theGraphQLReactiveRequestMySchemafor the __typename REACTIVE_EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the String, as expected by the __typename query/mutation.getAddFriendGraphQLRequest(String partialRequest) Get theGraphQLReactiveRequestMySchemafor the addFriend REACTIVE_EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Character, as expected by the addFriend query/mutation.getCreateHumanGraphQLRequest(String partialRequest) Get theGraphQLReactiveRequestMySchemafor the createHuman REACTIVE_EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Human, as expected by the createHuman query/mutation.getGraphQLRequest(String fullRequest) Get theGraphQLReactiveRequestMySchemafor full request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor a full request, as expected by the exec and execWithBindValues methods.
-
Constructor Details
-
MutationTypeReactiveExecutorMySchema
public MutationTypeReactiveExecutorMySchema()
-
-
Method Details
-
execWithBindValues
public reactor.core.publisher.Mono<MutationType> execWithBindValues(String queryResponseDef, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method takes a full request definition, and executes it against the GraphQL server. As this class is a mutation executor, the provided request must be a mutation full request. This request will be executed in reactive mode, that is: it returns aMono<org.junittest.starwars_client_springconfiguration.MutationType>
This method offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
Here is a sample on how to use it:- 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 emptyMap. 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 aDatefor theGraphQLScalarTypeDate). The parameters which value is missing in this map will no be transmitted toward the GraphQL server.- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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 reactor.core.publisher.Mono<MutationType> exec(String queryResponseDef, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method takes a full request definition, and executes it against the GraphQL server. As this class is a mutation executor, the provided request must be a mutation full request. This request will be executed in reactive mode, that is: it returns aMono<org.junittest.starwars_client_springconfiguration.MutationType>
This method offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
Here is a sample on how to use it:- 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:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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 reactor.core.publisher.Mono<MutationType> execWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionExceptionThis method takes a full request definition, and executes it against the GraphQL server. As this class is a mutation executor, the provided request must be a mutation full request. This request will be executed in reactive mode, that is: it returns aMono<org.junittest.starwars_client_springconfiguration.MutationType>
This method offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
Here is a sample on how to use it:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetGraphQLRequest(java.lang.String)method or one of thegetXxxxGraphQLRequest(String)methods.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 emptyMap- Throws:
com.graphql_java_generator.exception.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 reactor.core.publisher.Mono<MutationType> exec(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException This method takes a full request definition, and executes it against the GraphQL server. As this class is a mutation executor, the provided request must be a mutation full request. This request will be executed in reactive mode, that is: it returns aMono<org.junittest.starwars_client_springconfiguration.MutationType>
This method offers a logging of the call (if in debug mode), or of the call and its parameters (if in trace mode).
Here is a sample on how to use it:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetGraphQLRequest(java.lang.String)method or one of thegetXxxxGraphQLRequest(String)methods.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:
com.graphql_java_generator.exception.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 com.graphql_java_generator.client.request.Builder getResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor a full request, as expected by the exec and execWithBindValues methods.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getGraphQLRequest
public GraphQLReactiveRequestMySchema getGraphQLRequest(String fullRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLReactiveRequestMySchemafor full request. For instance:GraphQLReactiveRequestMySchema request = new GraphQLRequest(fullRequest);
- Parameters:
fullRequest- The full GraphQL Request, as specified in the GraphQL specification- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
createHumanWithBindValues
public reactor.core.publisher.Mono<Optional<Human>> createHumanWithBindValues(String queryResponseDef, String name, String homePlanet, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis 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):- Parameters:
queryResponseDef- The response definition of the query, in the native GraphQL format (see here above)name- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemahomePlanet- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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
-
createHuman
public reactor.core.publisher.Mono<Optional<Human>> createHuman(String queryResponseDef, String name, String homePlanet, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.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):- Parameters:
queryResponseDef- The response definition of the query/mutation, in the native GraphQL format (see here above)name- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemahomePlanet- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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
-
createHumanWithBindValues
public reactor.core.publisher.Mono<Optional<Human>> createHumanWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, String homePlanet, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionExceptionThis 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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetCreateHumanGraphQLRequest(java.lang.String)method.name- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemahomePlanet- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.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
-
createHuman
public reactor.core.publisher.Mono<Optional<Human>> createHuman(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, String homePlanet, Object... paramsAndValues) throws com.graphql_java_generator.exception.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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetCreateHumanGraphQLRequest(java.lang.String)method.name- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemahomePlanet- Parameter for the createHuman field of MutationType, as defined in the GraphQL schemaparamsAndValues- 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:
com.graphql_java_generator.exception.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
-
getCreateHumanResponseBuilder
public com.graphql_java_generator.client.request.Builder getCreateHumanResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Human, as expected by the createHuman query/mutation.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getCreateHumanGraphQLRequest
public GraphQLReactiveRequestMySchema getCreateHumanGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLReactiveRequestMySchemafor the createHuman REACTIVE_EXECUTOR, created with the given Partial request.- Parameters:
partialRequest- The Partial GraphQL request, as explained in the plugin client documentation- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
addFriendWithBindValues
public reactor.core.publisher.Mono<Optional<Character>> addFriendWithBindValues(String queryResponseDef, String idCharacter, String idNewFriend, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis 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):- Parameters:
queryResponseDef- The response definition of the query, in the native GraphQL format (see here above)idCharacter- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaidNewFriend- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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
-
addFriend
public reactor.core.publisher.Mono<Optional<Character>> addFriend(String queryResponseDef, String idCharacter, String idNewFriend, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.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):- Parameters:
queryResponseDef- The response definition of the query/mutation, in the native GraphQL format (see here above)idCharacter- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaidNewFriend- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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
-
addFriendWithBindValues
public reactor.core.publisher.Mono<Optional<Character>> addFriendWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String idCharacter, String idNewFriend, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionExceptionThis 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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetAddFriendGraphQLRequest(java.lang.String)method.idCharacter- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaidNewFriend- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.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
-
addFriend
public reactor.core.publisher.Mono<Optional<Character>> addFriend(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String idCharacter, String idNewFriend, Object... paramsAndValues) throws com.graphql_java_generator.exception.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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by thegetAddFriendGraphQLRequest(java.lang.String)method.idCharacter- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaidNewFriend- Parameter for the addFriend field of MutationType, as defined in the GraphQL schemaparamsAndValues- 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:
com.graphql_java_generator.exception.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
-
getAddFriendResponseBuilder
public com.graphql_java_generator.client.request.Builder getAddFriendResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Character, as expected by the addFriend query/mutation.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getAddFriendGraphQLRequest
public GraphQLReactiveRequestMySchema getAddFriendGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLReactiveRequestMySchemafor the addFriend REACTIVE_EXECUTOR, created with the given Partial request.- Parameters:
partialRequest- The Partial GraphQL request, as explained in the plugin client documentation- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
__typenameWithBindValues
public reactor.core.publisher.Mono<Optional<String>> __typenameWithBindValues(String queryResponseDef, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis 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):- 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/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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 reactor.core.publisher.Mono<Optional<String>> __typename(String queryResponseDef, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.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):- Parameters:
queryResponseDef- The response definition of the query/mutation, in the native GraphQL format (see here above)parameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException- When an error occurs during the request preparation, typically when building theObjectResponsecom.graphql_java_generator.exception.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 reactor.core.publisher.Mono<Optional<String>> __typenameWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionExceptionThis 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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by theget__typenameGraphQLRequest(java.lang.String)method.parameters- The list of values, for the bind variables defined in the query/mutation. If there is no bind variable in the defined query/mutation, this argument may be null or an emptyMap- Throws:
com.graphql_java_generator.exception.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 reactor.core.publisher.Mono<Optional<String>> __typename(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Object... paramsAndValues) throws com.graphql_java_generator.exception.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:- Parameters:
objectResponse- The definition of the response format, that describes what the GraphQL server is expected to return
Note: theObjectResponsetype of this parameter is defined for backward compatibility. In new implementations, the expected type is the generated GraphQLRequestMySchema POJO, as returned by theget__typenameGraphQLRequest(java.lang.String)method.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:
com.graphql_java_generator.exception.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 com.graphql_java_generator.client.request.Builder get__typenameResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the String, as expected by the __typename query/mutation.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
get__typenameGraphQLRequest
public GraphQLReactiveRequestMySchema get__typenameGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLReactiveRequestMySchemafor the __typename REACTIVE_EXECUTOR, created with the given Partial request.- Parameters:
partialRequest- The Partial GraphQL request, as explained in the plugin client documentation- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-