Package graphql.schema.validation
Class AppliedDirectiveArgumentsAreValid
java.lang.Object
graphql.schema.GraphQLTypeVisitorStub
graphql.schema.validation.AppliedDirectiveArgumentsAreValid
- All Implemented Interfaces:
GraphQLTypeVisitor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkArgument
(GraphQLDirective directive, GraphQLArgument argument, TraverserContext<GraphQLSchemaElement> context) private boolean
isValidExternalValue
(GraphQLSchema schema, Object externalValue, GraphQLInputType type, GraphQLContext graphQLContext, Locale locale) visitGraphQLDirective
(GraphQLDirective directive, TraverserContext<GraphQLSchemaElement> context) This method will be called twice.Methods inherited from class graphql.schema.GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLEnumType, visitGraphQLEnumValueDefinition, visitGraphQLFieldDefinition, visitGraphQLInputObjectField, visitGraphQLInputObjectType, visitGraphQLInterfaceType, visitGraphQLList, visitGraphQLNonNull, visitGraphQLObjectType, visitGraphQLScalarType, visitGraphQLType, visitGraphQLTypeReference, visitGraphQLUnionType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface graphql.schema.GraphQLTypeVisitor
changeNode, deleteNode, insertAfter, insertBefore, visitBackRef, visitGraphQLCompositeType, visitGraphQLDirectiveContainer, visitGraphQLFieldsContainer, visitGraphQLInputFieldsContainer, visitGraphQLInputType, visitGraphQLModifiedType, visitGraphQLNullableType, visitGraphQLOutputType, visitGraphQLUnmodifiedType
-
Field Details
-
validationUtil
-
-
Constructor Details
-
AppliedDirectiveArgumentsAreValid
public AppliedDirectiveArgumentsAreValid()
-
-
Method Details
-
visitGraphQLDirective
public TraversalControl visitGraphQLDirective(GraphQLDirective directive, TraverserContext<GraphQLSchemaElement> context) Description copied from interface:GraphQLTypeVisitor
This method will be called twice. Once for a directive definition in a schema and then do each time a directive is applied to a schema element When it's applied to a schema element thenTraverserContext.getParentNode()
will be the schema element that this is applied to. The graphql-java code base is trying to slowly move away from usingGraphQLDirective
s when they really should beGraphQLAppliedDirective
s and this is another place that has been left in. In the future this behavior will change and this will only visit directive definitions of a schema, not where they are applied.- Specified by:
visitGraphQLDirective
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLDirective
in classGraphQLTypeVisitorStub
- Parameters:
directive
- the directivecontext
- the traversal context- Returns:
- how to control the visitation processing
-
checkArgument
private void checkArgument(GraphQLDirective directive, GraphQLArgument argument, TraverserContext<GraphQLSchemaElement> context) -
isValidExternalValue
private boolean isValidExternalValue(GraphQLSchema schema, Object externalValue, GraphQLInputType type, GraphQLContext graphQLContext, Locale locale)
-