Package graphql.schema.validation
Class AppliedDirectiveArgumentsAreValid
- java.lang.Object
-
- graphql.schema.GraphQLTypeVisitorStub
-
- graphql.schema.validation.AppliedDirectiveArgumentsAreValid
-
- All Implemented Interfaces:
GraphQLTypeVisitor
public class AppliedDirectiveArgumentsAreValid extends GraphQLTypeVisitorStub
-
-
Field Summary
Fields Modifier and Type Field Description private ValidationUtilvalidationUtil
-
Constructor Summary
Constructors Constructor Description AppliedDirectiveArgumentsAreValid()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckArgument(GraphQLDirective directive, GraphQLArgument argument, TraverserContext<GraphQLSchemaElement> context)private booleanisValidExternalValue(GraphQLSchema schema, java.lang.Object externalValue, GraphQLInputType type, GraphQLContext graphQLContext, java.util.Locale locale)TraversalControlvisitGraphQLDirective(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 Detail
-
validationUtil
private ValidationUtil validationUtil
-
-
Method Detail
-
visitGraphQLDirective
public TraversalControl visitGraphQLDirective(GraphQLDirective directive, TraverserContext<GraphQLSchemaElement> context)
Description copied from interface:GraphQLTypeVisitorThis 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 usingGraphQLDirectives when they really should beGraphQLAppliedDirectives 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:
visitGraphQLDirectivein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLDirectivein 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, java.lang.Object externalValue, GraphQLInputType type, GraphQLContext graphQLContext, java.util.Locale locale)
-
-