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 FieldAndArgumentsprivate final ResultPathprivate final QueryVisitorFieldEnvironment -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetArgumentValue(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 FieldAndArgumentsmkParentArgs(QueryVisitorFieldEnvironment traversalEnv) private ResultPathmkPath(QueryVisitorFieldEnvironment traversalEnv)
-
Field Details
-
traversalEnv
-
parentArgs
-
path
-
-
Constructor Details
-
FieldAndArgumentsImpl
FieldAndArgumentsImpl(QueryVisitorFieldEnvironment traversalEnv)
-
-
Method Details
-
mkParentArgs
-
mkPath
-
getField
- Specified by:
getFieldin interfaceFieldAndArguments- Returns:
- the field in play
-
getFieldDefinition
- Specified by:
getFieldDefinitionin interfaceFieldAndArguments- Returns:
- the runtime type definition of the field
-
getParentType
- Specified by:
getParentTypein interfaceFieldAndArguments- Returns:
- the containing type of the field
-
getPath
- Specified by:
getPathin interfaceFieldAndArguments- Returns:
- the path to this field
-
getArgumentValuesByName
Description copied from interface:FieldAndArgumentsThis 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:
getArgumentValuesByNamein interfaceFieldAndArguments- Returns:
- a map of argument names to values
-
getArgumentValue
Description copied from interface:FieldAndArgumentsThis will return the named field argument value and cast it to the desired type.- Specified by:
getArgumentValuein 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:
getParentFieldAndArgumentsin interfaceFieldAndArguments- Returns:
- the parent arguments or null if there is no parent
-