public class GraphQLRequest extends Object
Constructor and Description |
---|
GraphQLRequest(BaseGraphQLMutation mutationObject)
Initialises the GraphQLRequest object from a BaseGraphQLMutation object.
|
GraphQLRequest(BaseGraphQLMutation mutationObject,
HashMap<String,String> variables)
Initialises the GraphQLRequest object from a BaseGraphQLMutation object.
|
GraphQLRequest(BaseGraphQLMutation mutationObject,
HashMap<String,String> variables,
String operationName)
Initialises the GraphQLRequest object from all properties
|
GraphQLRequest(IGraphQLQuery queryObject)
Initialises the GraphQLRequest object from a BaseGraphQLQuery object.
|
GraphQLRequest(IGraphQLQuery queryObject,
HashMap<String,String> variables)
Initialises the GraphQLRequest object from a BaseGraphQLQuery object.
|
GraphQLRequest(ObjectDataSenderBuilder queryObject,
HashMap<String,String> variables,
String operationName)
Initialises the GraphQLRequest from an ObjectDataBringer, operation name and variables.
|
GraphQLRequest(ObjectDataSenderBuilder queryObject,
String operationName)
Initialises the GraphQLRequest from an ObjectDataBringer and operation name.
|
GraphQLRequest(String query,
HashMap<String,String> variables,
String operationName)
Initialises the GraphQLRequest object from all properties
|
Modifier and Type | Method and Description |
---|---|
void |
addReturnObjectType(ObjectDataSenderBuilder singleQueryObject)
Add a return type to the Map
|
String |
getOperationName() |
String |
getQuery() |
Map<String,WWQueryResponseObjectInterface> |
getReturnObjectTypes()
If the query includes aliases we need to parse them out.
|
HashMap<String,String> |
getVariables() |
void |
setOperationName(String operationName) |
void |
setQuery(String query) |
void |
setReturnObjectTypes(Map<String,WWQueryResponseObjectInterface> returnObjectTypes)
Setter for returnObjectTypes
|
void |
setVariables(HashMap<String,String> variables) |
public GraphQLRequest(String query, HashMap<String,String> variables, String operationName)
query
- String, query passedvariables
- HashMap, dynamic variables passed with key as variable name, value as variable valueoperationName
- String, operation name for the querypublic GraphQLRequest(IGraphQLQuery queryObject) throws WWException
queryObject
- BaseGraphQLQuery containing an ObjectDataSenderBuilder
which will be parsed to return the full queryWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(IGraphQLQuery queryObject, HashMap<String,String> variables) throws WWException
queryObject
- BaseGraphQLQuery containing an ObjectDataSenderBuilder
which will be parsed to return the full queryvariables
- HashMap of variables to pass with the query, where the key is the variable name and the value is the variable valueWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(BaseGraphQLMutation mutationObject) throws WWException
mutationObject
- BaseGraphQLMutation object containing InputDataSenderBuilder
and ObjectDataSenderBuilder
objects which will be parsed to return the full queryWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(BaseGraphQLMutation mutationObject, HashMap<String,String> variables) throws WWException
mutationObject
- BaseGraphQLMutation object containing InputDataSenderBuilder
and ObjectDataSenderBuilder
objects which will be parsed to return the full queryvariables
- HashMap of variables to pass with the query, where the key is the variable name and the value is the variable valueWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(BaseGraphQLMutation mutationObject, HashMap<String,String> variables, String operationName) throws WWException
mutationObject
- BaseGraphQLMutation object containing InputDataSenderBuilder
and ObjectDataSenderBuilder
objects which will be parsed to return the full queryvariables
- HashMap of variables to pass with the query, where the key is the variable name and the value is the variable valueoperationName
- String, operation name for the queryWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(ObjectDataSenderBuilder queryObject, String operationName) throws WWException
queryObject
- ObjectDataBringer containing the query settingsoperationName
- String operationName to useWWException
- error if encountered parsing the queryObjectpublic GraphQLRequest(ObjectDataSenderBuilder queryObject, HashMap<String,String> variables, String operationName) throws WWException
queryObject
- ObjectDataBringer containing the query settingsvariables
- HashMap of variables to pass with the query, where the key is the variable name and the value is the variable valueoperationName
- String operationName to useWWException
- error if encountered parsing the queryObjectpublic void addReturnObjectType(ObjectDataSenderBuilder singleQueryObject)
singleQueryObject
- a single ObjectDataSenderBuilder
from which to get return type and object namepublic String getQuery()
public void setQuery(String query)
query
- String, query passedpublic HashMap<String,String> getVariables()
public void setVariables(HashMap<String,String> variables)
variables
- HashMap, dynamic variables passed with key as variable name, value as variable valuepublic String getOperationName()
public void setOperationName(String operationName)
operationName
- String, name of operation being performedpublic Map<String,WWQueryResponseObjectInterface> getReturnObjectTypes()
BaseGraphQLMultiQuery
is the type of IGraphQLQuery
passed in
This means we know what to cast the return object to, in this case SpaceWrapperpublic void setReturnObjectTypes(Map<String,WWQueryResponseObjectInterface> returnObjectTypes)
returnObjectTypes
- Map of alias name and enum holding detailsCopyright © 2018 OpenNTF. All rights reserved.