Package graphql.analysis.values
Interface ValueVisitor
-
@PublicSpi public interface ValueVisitor
A visitor callback used byValueTraverser
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ValueVisitor.InputElements
Represents the elements that leads to a value and type
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object
ABSENCE_SENTINEL
This magic sentinel value indicates that a value should be removed from a list or object versus being set to null, that is the difference between a value not being present and a value being null
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @Nullable java.lang.Object
visitAppliedDirectiveArgumentValue(@Nullable java.lang.Object coercedValue, GraphQLAppliedDirectiveArgument graphQLAppliedDirectiveArgument, ValueVisitor.InputElements inputElements)
This is called when aGraphQLAppliedDirectiveArgument
is encountereddefault @Nullable java.lang.Object
visitArgumentValue(@Nullable java.lang.Object coercedValue, GraphQLArgument graphQLArgument, ValueVisitor.InputElements inputElements)
This is called when aGraphQLArgument
is encountereddefault @Nullable java.lang.Object
visitEnumValue(@Nullable java.lang.Object coercedValue, GraphQLEnumType inputType, ValueVisitor.InputElements inputElements)
This is called when an enum value is encountereddefault @Nullable java.lang.Object
visitInputObjectFieldValue(@Nullable java.lang.Object coercedValue, GraphQLInputObjectType inputObjectType, GraphQLInputObjectField inputObjectField, ValueVisitor.InputElements inputElements)
This is called when an input object field value is encountereddefault @Nullable java.util.Map<java.lang.String,java.lang.Object>
visitInputObjectValue(@Nullable java.util.Map<java.lang.String,java.lang.Object> coercedValue, GraphQLInputObjectType inputObjectType, ValueVisitor.InputElements inputElements)
This is called when an input object value is encountered.default @Nullable java.util.List<java.lang.Object>
visitListValue(@Nullable java.util.List<java.lang.Object> coercedValue, GraphQLList listInputType, ValueVisitor.InputElements inputElements)
This is called when an input list value is encountered.default @Nullable java.lang.Object
visitScalarValue(@Nullable java.lang.Object coercedValue, GraphQLScalarType inputType, ValueVisitor.InputElements inputElements)
This is called when a scalar value is encountered
-
-
-
Method Detail
-
visitScalarValue
@Nullable default @Nullable java.lang.Object visitScalarValue(@Nullable @Nullable java.lang.Object coercedValue, GraphQLScalarType inputType, ValueVisitor.InputElements inputElements)
This is called when a scalar value is encountered- Parameters:
coercedValue
- the value that is in coerced forminputType
- the type of scalarinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitEnumValue
@Nullable default @Nullable java.lang.Object visitEnumValue(@Nullable @Nullable java.lang.Object coercedValue, GraphQLEnumType inputType, ValueVisitor.InputElements inputElements)
This is called when an enum value is encountered- Parameters:
coercedValue
- the value that is in coerced forminputType
- the type of enuminputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitInputObjectFieldValue
@Nullable default @Nullable java.lang.Object visitInputObjectFieldValue(@Nullable @Nullable java.lang.Object coercedValue, GraphQLInputObjectType inputObjectType, GraphQLInputObjectField inputObjectField, ValueVisitor.InputElements inputElements)
This is called when an input object field value is encountered- Parameters:
coercedValue
- the value that is in coerced forminputObjectType
- the input object type containing the input fieldinputObjectField
- the input object fieldinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitInputObjectValue
@Nullable default @Nullable java.util.Map<java.lang.String,java.lang.Object> visitInputObjectValue(@Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> coercedValue, GraphQLInputObjectType inputObjectType, ValueVisitor.InputElements inputElements)
This is called when an input object value is encountered.- Parameters:
coercedValue
- the value that is in coerced forminputObjectType
- the input object typeinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitListValue
@Nullable default @Nullable java.util.List<java.lang.Object> visitListValue(@Nullable @Nullable java.util.List<java.lang.Object> coercedValue, GraphQLList listInputType, ValueVisitor.InputElements inputElements)
This is called when an input list value is encountered.- Parameters:
coercedValue
- the value that is in coerced formlistInputType
- the input list typeinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitArgumentValue
@Nullable default @Nullable java.lang.Object visitArgumentValue(@Nullable @Nullable java.lang.Object coercedValue, GraphQLArgument graphQLArgument, ValueVisitor.InputElements inputElements)
This is called when aGraphQLArgument
is encountered- Parameters:
coercedValue
- the value that is in coerced formgraphQLArgument
- theGraphQLArgument
in playinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
visitAppliedDirectiveArgumentValue
@Nullable default @Nullable java.lang.Object visitAppliedDirectiveArgumentValue(@Nullable @Nullable java.lang.Object coercedValue, GraphQLAppliedDirectiveArgument graphQLAppliedDirectiveArgument, ValueVisitor.InputElements inputElements)
This is called when aGraphQLAppliedDirectiveArgument
is encountered- Parameters:
coercedValue
- the value that is in coerced formgraphQLAppliedDirectiveArgument
- theGraphQLAppliedDirectiveArgument
in playinputElements
- the elements that lead to this value and type- Returns:
- the same value or a new value
-
-