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 interfaceValueVisitor.InputElementsRepresents the elements that leads to a value and type
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ObjectABSENCE_SENTINELThis 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.ObjectvisitAppliedDirectiveArgumentValue(@Nullable java.lang.Object coercedValue, GraphQLAppliedDirectiveArgument graphQLAppliedDirectiveArgument, ValueVisitor.InputElements inputElements)This is called when aGraphQLAppliedDirectiveArgumentis encountereddefault @Nullable java.lang.ObjectvisitArgumentValue(@Nullable java.lang.Object coercedValue, GraphQLArgument graphQLArgument, ValueVisitor.InputElements inputElements)This is called when aGraphQLArgumentis encountereddefault @Nullable java.lang.ObjectvisitEnumValue(@Nullable java.lang.Object coercedValue, GraphQLEnumType inputType, ValueVisitor.InputElements inputElements)This is called when an enum value is encountereddefault @Nullable java.lang.ObjectvisitInputObjectFieldValue(@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.ObjectvisitScalarValue(@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 aGraphQLArgumentis encountered- Parameters:
coercedValue- the value that is in coerced formgraphQLArgument- theGraphQLArgumentin 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 aGraphQLAppliedDirectiveArgumentis encountered- Parameters:
coercedValue- the value that is in coerced formgraphQLAppliedDirectiveArgument- theGraphQLAppliedDirectiveArgumentin playinputElements- the elements that lead to this value and type- Returns:
- the same value or a new value
-
-