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 voidcheckArgument(GraphQLDirective directive, GraphQLArgument argument, TraverserContext<GraphQLSchemaElement> context) private booleanisValidExternalValue(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 GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLEnumType, visitGraphQLEnumValueDefinition, visitGraphQLFieldDefinition, visitGraphQLInputObjectField, visitGraphQLInputObjectType, visitGraphQLInterfaceType, visitGraphQLList, visitGraphQLNonNull, visitGraphQLObjectType, visitGraphQLScalarType, visitGraphQLType, visitGraphQLTypeReference, visitGraphQLUnionTypeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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: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, Object externalValue, GraphQLInputType type, GraphQLContext graphQLContext, Locale locale)
-