public class InputParameter extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
Object |
getValue() |
String |
getValueForGraphqlQuery(Map<String,Object> bindVariables)
Returns the parameter, as it should be written in the GraphQL query.
|
static InputParameter |
newBindParameter(String name,
String bindParameterName,
boolean mandatory)
Creates and returns a new instance of
InputParameter, which is bound to a bind variable. |
static InputParameter |
newHardCodedParameter(String name,
Object value)
Creates and returns a new instance of
InputParameter, which value is given, and can not be changed
afterwards |
public static InputParameter newBindParameter(String name, String bindParameterName, boolean mandatory)
InputParameter, which is bound to a bind variable. The value for
this bind variable must be provided, when calling the request execution.name - bindParameterName - mandatory - true if the parameter's value must be defined during request/mutation/subscription execution. GraphQLRequestExecutionException exception is thrown at execution timeQueryExecutorImpl#execute(String, ObjectResponse, List, Class)public static InputParameter newHardCodedParameter(String name, Object value)
InputParameter, which value is given, and can not be changed
afterwardsname - value - public String getName()
public Object getValue()
public String getValueForGraphqlQuery(Map<String,Object> bindVariables) throws GraphQLRequestExecutionException
bindVariables - The map for the bind variables. It may be null, if this input parameter is a hard coded one. If this
parameter is a Bind Variable, then bindVariables is mandatory, and it must contain a value for th bind
parameter which name is stored in bindParameterName.GraphQLRequestExecutionExceptionCopyright © 2020. All rights reserved.