Interface FieldAndArguments
-
@PublicApi public interface FieldAndArguments
This represents a field and its arguments that may be validated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
getArgumentValue(java.lang.String argumentName)
This will return the named field argument value and cast it to the desired type.java.util.Map<java.lang.String,java.lang.Object>
getArgumentValuesByName()
This will be a map of argument names to argument values.Field
getField()
GraphQLFieldDefinition
getFieldDefinition()
FieldAndArguments
getParentFieldAndArguments()
GraphQLCompositeType
getParentType()
ResultPath
getPath()
-
-
-
Method Detail
-
getField
Field getField()
- Returns:
- the field in play
-
getFieldDefinition
GraphQLFieldDefinition getFieldDefinition()
- Returns:
- the runtime type definition of the field
-
getParentType
GraphQLCompositeType getParentType()
- Returns:
- the containing type of the field
-
getParentFieldAndArguments
FieldAndArguments getParentFieldAndArguments()
- Returns:
- the parent arguments or null if there is no parent
-
getPath
ResultPath getPath()
- Returns:
- the path to this field
-
getArgumentValuesByName
java.util.Map<java.lang.String,java.lang.Object> getArgumentValuesByName()
This will be a map of argument names to argument values. This will contain any variables transferred along with any default values ready for execution. This is what you use to do most of your validation against- Returns:
- a map of argument names to values
-
getArgumentValue
<T> T getArgumentValue(java.lang.String argumentName)
This will return the named field argument value and cast it to the desired type.- Type Parameters:
T
- the type of the underlying value object- Parameters:
argumentName
- the name of the argument- Returns:
- a cast object of type T
-
-