public class ResponseField
extends java.lang.Object
ResponseField.Type class.| Modifier and Type | Class and Description |
|---|---|
static class |
ResponseField.BooleanCondition
Abstraction for boolean condition
|
static class |
ResponseField.Condition
Abstraction for condition to be associated with field
|
static class |
ResponseField.CustomTypeField
Abstraction for a Field representing a custom GraphQL scalar type.
|
static class |
ResponseField.Type
An abstraction for the field types
|
static class |
ResponseField.TypeNameCondition
Abstraction for type name condition
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
arguments() |
java.lang.String |
cacheKey(Operation.Variables variables) |
java.util.List<ResponseField.Condition> |
conditions() |
java.lang.String |
fieldName() |
static ResponseField |
forBoolean(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.BOOLEAN. |
static ResponseField.CustomTypeField |
forCustomType(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
ScalarType scalarType,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing a custom GraphQL Scalar type,
ResponseField.Type.CUSTOM |
static ResponseField |
forDouble(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.DOUBLE. |
static ResponseField |
forEnum(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.ENUM. |
static ResponseField |
forFragment(java.lang.String responseName,
java.lang.String fieldName,
java.util.List<java.lang.String> typeConditions)
Factory method for creating a Field instance representing
ResponseField.Type.FRAGMENT. |
static ResponseField |
forInlineFragment(java.lang.String responseName,
java.lang.String fieldName,
java.util.List<java.lang.String> typeConditions)
Factory method for creating a Field instance representing
ResponseField.Type.INLINE_FRAGMENT. |
static ResponseField |
forInt(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.INT. |
static ResponseField |
forList(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.LIST. |
static ResponseField |
forLong(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.LONG. |
static ResponseField |
forObject(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing a custom
ResponseField.Type.OBJECT. |
static ResponseField |
forString(java.lang.String responseName,
java.lang.String fieldName,
java.util.Map<java.lang.String,java.lang.Object> arguments,
boolean optional,
java.util.List<ResponseField.Condition> conditions)
Factory method for creating a Field instance representing
ResponseField.Type.STRING. |
boolean |
optional() |
java.lang.Object |
resolveArgument(java.lang.String name,
Operation.Variables variables)
Resolve field argument value by name.
|
java.lang.String |
responseName() |
ResponseField.Type |
type() |
public static ResponseField forString(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.STRING.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.STRINGpublic static ResponseField forInt(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.INT.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.INTpublic static ResponseField forLong(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.LONG.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.LONGpublic static ResponseField forDouble(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.DOUBLE.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.DOUBLEpublic static ResponseField forBoolean(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.BOOLEAN.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.BOOLEANpublic static ResponseField forEnum(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.ENUM.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.ENUMpublic static ResponseField forObject(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.OBJECT.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.OBJECTpublic static ResponseField forList(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.LIST.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredconditions - list of conditions for this fieldResponseField.Type.LISTpublic static ResponseField.CustomTypeField forCustomType(java.lang.String responseName, java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> arguments, boolean optional, ScalarType scalarType, java.util.List<ResponseField.Condition> conditions)
ResponseField.Type.CUSTOMresponseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationarguments - arguments to be passed along with the fieldoptional - whether the arguments passed along are optional or requiredscalarType - the custom scalar type of the fieldconditions - list of conditions for this fieldResponseField.Type.CUSTOMpublic static ResponseField forFragment(java.lang.String responseName, java.lang.String fieldName, java.util.List<java.lang.String> typeConditions)
ResponseField.Type.FRAGMENT.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationtypeConditions - conditional GraphQL typesResponseField.Type.FRAGMENTpublic static ResponseField forInlineFragment(java.lang.String responseName, java.lang.String fieldName, java.util.List<java.lang.String> typeConditions)
ResponseField.Type.INLINE_FRAGMENT.responseName - alias for the result of a fieldfieldName - name of the field in the GraphQL operationtypeConditions - conditional GraphQL typesResponseField.Type.INLINE_FRAGMENTpublic ResponseField.Type type()
public java.lang.String responseName()
public java.lang.String fieldName()
public java.util.Map<java.lang.String,java.lang.Object> arguments()
public boolean optional()
public java.util.List<ResponseField.Condition> conditions()
public java.lang.String cacheKey(Operation.Variables variables)
@Nullable
public java.lang.Object resolveArgument(@NotNull
java.lang.String name,
@NotNull
Operation.Variables variables)
name - argument namevariables - values of operation variables