Class FieldValidationSupport.FieldAndArgumentsImpl
- java.lang.Object
-
- graphql.execution.instrumentation.fieldvalidation.FieldValidationSupport.FieldAndArgumentsImpl
-
- All Implemented Interfaces:
FieldAndArguments
- Enclosing class:
- FieldValidationSupport
private static class FieldValidationSupport.FieldAndArgumentsImpl extends java.lang.Object implements FieldAndArguments
-
-
Field Summary
Fields Modifier and Type Field Description private FieldAndArguments
parentArgs
private ResultPath
path
private QueryVisitorFieldEnvironment
traversalEnv
-
Constructor Summary
Constructors Constructor Description FieldAndArgumentsImpl(QueryVisitorFieldEnvironment traversalEnv)
-
Method Summary
All Methods Instance Methods Concrete 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()
private FieldAndArguments
mkParentArgs(QueryVisitorFieldEnvironment traversalEnv)
private ResultPath
mkPath(QueryVisitorFieldEnvironment traversalEnv)
-
-
-
Field Detail
-
traversalEnv
private final QueryVisitorFieldEnvironment traversalEnv
-
parentArgs
private final FieldAndArguments parentArgs
-
path
private final ResultPath path
-
-
Constructor Detail
-
FieldAndArgumentsImpl
FieldAndArgumentsImpl(QueryVisitorFieldEnvironment traversalEnv)
-
-
Method Detail
-
mkParentArgs
private FieldAndArguments mkParentArgs(QueryVisitorFieldEnvironment traversalEnv)
-
mkPath
private ResultPath mkPath(QueryVisitorFieldEnvironment traversalEnv)
-
getField
public Field getField()
- Specified by:
getField
in interfaceFieldAndArguments
- Returns:
- the field in play
-
getFieldDefinition
public GraphQLFieldDefinition getFieldDefinition()
- Specified by:
getFieldDefinition
in interfaceFieldAndArguments
- Returns:
- the runtime type definition of the field
-
getParentType
public GraphQLCompositeType getParentType()
- Specified by:
getParentType
in interfaceFieldAndArguments
- Returns:
- the containing type of the field
-
getPath
public ResultPath getPath()
- Specified by:
getPath
in interfaceFieldAndArguments
- Returns:
- the path to this field
-
getArgumentValuesByName
public java.util.Map<java.lang.String,java.lang.Object> getArgumentValuesByName()
Description copied from interface:FieldAndArguments
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- Specified by:
getArgumentValuesByName
in interfaceFieldAndArguments
- Returns:
- a map of argument names to values
-
getArgumentValue
public <T> T getArgumentValue(java.lang.String argumentName)
Description copied from interface:FieldAndArguments
This will return the named field argument value and cast it to the desired type.- Specified by:
getArgumentValue
in interfaceFieldAndArguments
- Type Parameters:
T
- the type of the underlying value object- Parameters:
argumentName
- the name of the argument- Returns:
- a cast object of type T
-
getParentFieldAndArguments
public FieldAndArguments getParentFieldAndArguments()
- Specified by:
getParentFieldAndArguments
in interfaceFieldAndArguments
- Returns:
- the parent arguments or null if there is no parent
-
-