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 Object
implements FieldAndArguments
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldAndArguments
private final ResultPath
private final QueryVisitorFieldEnvironment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
getArgumentValue
(String argumentName) This will return the named field argument value and cast it to the desired type.This will be a map of argument names to argument values.getField()
getPath()
private FieldAndArguments
mkParentArgs
(QueryVisitorFieldEnvironment traversalEnv) private ResultPath
mkPath
(QueryVisitorFieldEnvironment traversalEnv)
-
Field Details
-
traversalEnv
-
parentArgs
-
path
-
-
Constructor Details
-
FieldAndArgumentsImpl
FieldAndArgumentsImpl(QueryVisitorFieldEnvironment traversalEnv)
-
-
Method Details
-
mkParentArgs
-
mkPath
-
getField
- Specified by:
getField
in interfaceFieldAndArguments
- Returns:
- the field in play
-
getFieldDefinition
- Specified by:
getFieldDefinition
in interfaceFieldAndArguments
- Returns:
- the runtime type definition of the field
-
getParentType
- Specified by:
getParentType
in interfaceFieldAndArguments
- Returns:
- the containing type of the field
-
getPath
- Specified by:
getPath
in interfaceFieldAndArguments
- Returns:
- the path to this field
-
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
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
- Specified by:
getParentFieldAndArguments
in interfaceFieldAndArguments
- Returns:
- the parent arguments or null if there is no parent
-