Class QueryTypeExecutorMySchema
java.lang.Object
org.junittest.starwars_client_springconfiguration.QueryTypeExecutorMySchema
- All Implemented Interfaces:
GraphQLQueryExecutor
This class contains the methods that allows the execution of the queries or mutations that are defined in the QueryType of the GraphQL schema.
These methods allows:
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__schema(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Object... paramsAndValues) This method is expected by the graphql-java framework.This method executes a partial query on the __schema query against the GraphQL server.__schemaWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Map<String, Object> parameters) This method is expected by the graphql-java framework.__schemaWithBindValues(String queryResponseDef, Map<String, Object> parameters) This method executes a partial query on the __schema query against the GraphQL server.__type(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, Object... paramsAndValues) This method is expected by the graphql-java framework.This method executes a partial query on the __type query against the GraphQL server.__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 on the __typename 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 on the __typename query against the GraphQL server.__typeWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, Map<String, Object> parameters) This method is expected by the graphql-java framework.This method executes a partial query on the __type query against the GraphQL server.characters(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, Object... paramsAndValues) This method is expected by the graphql-java framework.characters(String queryResponseDef, Episode episode, Object... paramsAndValues) This method executes a partial query on the characters query against the GraphQL server.charactersWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, Map<String, Object> parameters) This method is expected by the graphql-java framework.This method executes a partial query on the characters query against the GraphQL server.droid(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, Object... paramsAndValues) This method is expected by the graphql-java framework.This method executes a partial query on the droid query against the GraphQL server.droidWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, Map<String, Object> parameters) This method is expected by the graphql-java framework.This method executes a partial query on the droid query against the GraphQL server.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.This method takes a full request definition, and executes it against the GraphQL server.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.execWithBindValues(String queryResponseDef, Map<String, Object> parameters) This method takes a full request definition, and executes it against the GraphQL server.get__schemaGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the __schema EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the __Schema, as expected by the __schema query.get__typeGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the __type EXECUTOR, created with the given Partial request.get__typenameGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the __typename EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the String, as expected by the __typename query.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the __Type, as expected by the __type query.getCharactersGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the characters EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Character, as expected by the characters query.getDroidGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the droid EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Droid, as expected by the droid query.getGraphQLRequest(String fullRequest) Get theGraphQLRequestMySchemafor full request.getHeroGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the hero EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Character, as expected by the hero query.getHumanGraphQLRequest(String partialRequest) Get theGraphQLRequestMySchemafor the human EXECUTOR, created with the given Partial request.com.graphql_java_generator.client.request.BuilderGet theBuilderfor the Human, as expected by the human query.com.graphql_java_generator.client.request.BuilderGet theBuilderfor a full request, as expected by the exec and execWithBindValues methods.hero(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, Object... paramsAndValues) This method is expected by the graphql-java framework.This method executes a partial query on the hero query against the GraphQL server.heroWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, Map<String, Object> parameters) This method is expected by the graphql-java framework.This method executes a partial query on the hero query against the GraphQL server.human(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, Object... paramsAndValues) This method is expected by the graphql-java framework.This method executes a partial query on the human query against the GraphQL server.humanWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, Map<String, Object> parameters) This method is expected by the graphql-java framework.This method executes a partial query on the human query against the GraphQL server.
-
Constructor Details
-
QueryTypeExecutorMySchema
public QueryTypeExecutorMySchema()
-
-
Method Details
-
execWithBindValues
public QueryType 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 query executor, the provided request must be a query full request.
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: 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 keyword.
It 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 omit the query 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 declared in the request you defined. 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 declared in the request you defined (in the above sample: param is an optional parameter and skip is a mandatory one). The value is the parameter value in its Java type (for instance aDatefor theGraphQLScalarTypeDate). The parameters which value is missing in this map will be ignored.- 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 QueryType 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 query executor, the provided request must be a query full request.
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 omit the query 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 QueryType 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 query executor, the provided request must be a query full request.
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 declared in the request you defined. 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 QueryType 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 query executor, the provided request must be a query full request.
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)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 GraphQLRequestMySchema getGraphQLRequest(String fullRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor full request. For instance:GraphQLRequestMySchema request = new GraphQLRequest(fullRequest);
- Parameters:
fullRequest- The full GraphQL Request, as specified in the GraphQL specification- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
heroWithBindValues
public Character heroWithBindValues(String queryResponseDef, Episode episode, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the hero query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 theheroof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)episode- Parameter for the hero field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
hero
public Character hero(String queryResponseDef, Episode episode, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the hero query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 theheroof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)episode- Parameter for the hero field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
heroWithBindValues
public Character heroWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, 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 thegetHeroGraphQLRequest(java.lang.String)method.episode- Parameter for the hero field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. 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
-
hero
public Character hero(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, 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 thegetHeroGraphQLRequest(java.lang.String)method.episode- Parameter for the hero field of QueryType, 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
-
getHeroResponseBuilder
public com.graphql_java_generator.client.request.Builder getHeroResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Character, as expected by the hero query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getHeroGraphQLRequest
public GraphQLRequestMySchema getHeroGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the hero 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
-
charactersWithBindValues
public List<Character> charactersWithBindValues(String queryResponseDef, Episode episode, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the characters query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thecharactersof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)episode- Parameter for the characters field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
characters
public List<Character> characters(String queryResponseDef, Episode episode, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the characters query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thecharactersof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)episode- Parameter for the characters field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
charactersWithBindValues
public List<Character> charactersWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, 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 thegetCharactersGraphQLRequest(java.lang.String)method.episode- Parameter for the characters field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. 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
-
characters
public List<Character> characters(com.graphql_java_generator.client.request.ObjectResponse objectResponse, Episode episode, 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 thegetCharactersGraphQLRequest(java.lang.String)method.episode- Parameter for the characters field of QueryType, 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
-
getCharactersResponseBuilder
public com.graphql_java_generator.client.request.Builder getCharactersResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Character, as expected by the characters query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getCharactersGraphQLRequest
public GraphQLRequestMySchema getCharactersGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the characters 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
-
humanWithBindValues
public Human humanWithBindValues(String queryResponseDef, String id, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the human query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thehumanof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)id- Parameter for the human field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
human
public Human human(String queryResponseDef, String id, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the human query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thehumanof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)id- Parameter for the human field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
humanWithBindValues
public Human humanWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, 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 thegetHumanGraphQLRequest(java.lang.String)method.id- Parameter for the human field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. 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
-
human
public Human human(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, 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 thegetHumanGraphQLRequest(java.lang.String)method.id- Parameter for the human field of QueryType, 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
-
getHumanResponseBuilder
public com.graphql_java_generator.client.request.Builder getHumanResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Human, as expected by the human query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getHumanGraphQLRequest
public GraphQLRequestMySchema getHumanGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the human 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
-
droidWithBindValues
public Droid droidWithBindValues(String queryResponseDef, String id, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the droid query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thedroidof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)id- Parameter for the droid field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
droid
public Droid droid(String queryResponseDef, String id, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the droid query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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 thedroidof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)id- Parameter for the droid field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
droidWithBindValues
public Droid droidWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, 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 thegetDroidGraphQLRequest(java.lang.String)method.id- Parameter for the droid field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. 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
-
droid
public Droid droid(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String id, 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 thegetDroidGraphQLRequest(java.lang.String)method.id- Parameter for the droid field of QueryType, 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
-
getDroidResponseBuilder
public com.graphql_java_generator.client.request.Builder getDroidResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the Droid, as expected by the droid query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
getDroidGraphQLRequest
public GraphQLRequestMySchema getDroidGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the droid 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
-
__schemaWithBindValues
public __Schema __schemaWithBindValues(String queryResponseDef, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the __schema query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__schemaof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)parameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
__schema
public __Schema __schema(String queryResponseDef, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the __schema query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__schemaof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)parameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
__schemaWithBindValues
public __Schema __schemaWithBindValues(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__schemaGraphQLRequest(java.lang.String)method.parameters- The list of values, for the bind variables declared in the request you defined. 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
-
__schema
public __Schema __schema(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__schemaGraphQLRequest(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__schemaResponseBuilder
public com.graphql_java_generator.client.request.Builder get__schemaResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the __Schema, as expected by the __schema query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
get__schemaGraphQLRequest
public GraphQLRequestMySchema get__schemaGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the __schema 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
-
__typeWithBindValues
public __Type __typeWithBindValues(String queryResponseDef, String name, Map<String, Object> parameters) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionThis method executes a partial query on the __type query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__typeof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)name- Parameter for the __type field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
__type
public __Type __type(String queryResponseDef, String name, Object... paramsAndValues) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException This method executes a partial query on the __type query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__typeof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)name- Parameter for the __type field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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
-
__typeWithBindValues
public __Type __typeWithBindValues(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, 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__typeGraphQLRequest(java.lang.String)method.name- Parameter for the __type field of QueryType, as defined in the GraphQL schemaparameters- The list of values, for the bind variables declared in the request you defined. 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
-
__type
public __Type __type(com.graphql_java_generator.client.request.ObjectResponse objectResponse, String name, 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__typeGraphQLRequest(java.lang.String)method.name- Parameter for the __type field of QueryType, 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
-
get__typeResponseBuilder
public com.graphql_java_generator.client.request.Builder get__typeResponseBuilder() throws com.graphql_java_generator.exception.GraphQLRequestPreparationExceptionGet theBuilderfor the __Type, as expected by the __type query.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
get__typeGraphQLRequest
public GraphQLRequestMySchema get__typeGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the __type 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 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 on the __typename query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__typenameof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)parameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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 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 on the __typename query against the GraphQL server. That is, the query is one of the field of the QueryType type defined in the GraphQL schema. The queryResponseDef contains the part of the query that follows the field name.
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__typenameof the QueryType query type. It can be something like "{ id name }", or "" for a scalar. Please take a look at the StarWars, Forum and other samples for more complex queries.
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)parameters- The list of values, for the bind variables declared in the request you defined. If there is no bind variable in the defined Query, 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 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 declared in the request you defined. 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
-
__typename
public 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.- Returns:
- Throws:
com.graphql_java_generator.exception.GraphQLRequestPreparationException
-
get__typenameGraphQLRequest
public GraphQLRequestMySchema get__typenameGraphQLRequest(String partialRequest) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException Get theGraphQLRequestMySchemafor the __typename 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
-