Package graphql.schema.validation
Class NoUnbrokenInputCycles
java.lang.Object
graphql.schema.GraphQLTypeVisitorStub
graphql.schema.validation.NoUnbrokenInputCycles
- All Implemented Interfaces:
GraphQLTypeVisitor
Schema validation rule ensuring no input type forms an unbroken non-nullable recursion,
as such a type would be impossible to satisfy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
check
(GraphQLInputObjectType type, Set<GraphQLType> seen, List<String> path, SchemaValidationErrorCollector validationErrorCollector) private String
getErrorMessage
(List<String> path) private GraphQLType
unwrapNonNull
(GraphQLNonNull type) visitGraphQLFieldDefinition
(GraphQLFieldDefinition fieldDef, TraverserContext<GraphQLSchemaElement> context) Methods inherited from class graphql.schema.GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLDirective, visitGraphQLEnumType, visitGraphQLEnumValueDefinition, 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
-
Constructor Details
-
NoUnbrokenInputCycles
public NoUnbrokenInputCycles()
-
-
Method Details
-
visitGraphQLFieldDefinition
public TraversalControl visitGraphQLFieldDefinition(GraphQLFieldDefinition fieldDef, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLFieldDefinition
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLFieldDefinition
in classGraphQLTypeVisitorStub
-
check
private void check(GraphQLInputObjectType type, Set<GraphQLType> seen, List<String> path, SchemaValidationErrorCollector validationErrorCollector) -
unwrapNonNull
-
getErrorMessage
-