Package graphql.schema.validation
Class TypeAndFieldRule
java.lang.Object
graphql.schema.GraphQLTypeVisitorStub
graphql.schema.validation.TypeAndFieldRule
- All Implemented Interfaces:
GraphQLTypeVisitor
The validation about GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLScalarType.
- Types must define one or more fields;
- Enum type must define one or more enum values;
- Union type must include one or more unique member types;
- The member types of a Union type must all be Object base types;
- Non‐Null type must not wrap another Non‐Null type;
- Invalid name begin with "__" (two underscores).
details in https://spec.graphql.org/June2018/#sec-Type-System
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvisitGraphQLEnumType(GraphQLEnumType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLInputObjectType(GraphQLInputObjectType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLInterfaceType(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLObjectType(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLUnionType(GraphQLUnionType type, TraverserContext<GraphQLSchemaElement> context) Methods inherited from class graphql.schema.GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLDirective, visitGraphQLEnumValueDefinition, visitGraphQLFieldDefinition, visitGraphQLInputObjectField, visitGraphQLList, visitGraphQLNonNull, visitGraphQLScalarType, visitGraphQLType, visitGraphQLTypeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface graphql.schema.GraphQLTypeVisitor
changeNode, deleteNode, insertAfter, insertBefore, visitBackRef, visitGraphQLCompositeType, visitGraphQLDirectiveContainer, visitGraphQLFieldsContainer, visitGraphQLInputFieldsContainer, visitGraphQLInputType, visitGraphQLModifiedType, visitGraphQLNullableType, visitGraphQLOutputType, visitGraphQLUnmodifiedType
-
Constructor Details
-
TypeAndFieldRule
public TypeAndFieldRule()
-
-
Method Details
-
visitGraphQLInterfaceType
public TraversalControl visitGraphQLInterfaceType(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInterfaceTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLInterfaceTypein classGraphQLTypeVisitorStub
-
visitGraphQLObjectType
public TraversalControl visitGraphQLObjectType(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLObjectTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLObjectTypein classGraphQLTypeVisitorStub
-
visitGraphQLUnionType
public TraversalControl visitGraphQLUnionType(GraphQLUnionType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLUnionTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLUnionTypein classGraphQLTypeVisitorStub
-
visitGraphQLEnumType
public TraversalControl visitGraphQLEnumType(GraphQLEnumType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLEnumTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLEnumTypein classGraphQLTypeVisitorStub
-
visitGraphQLInputObjectType
public TraversalControl visitGraphQLInputObjectType(GraphQLInputObjectType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInputObjectTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLInputObjectTypein classGraphQLTypeVisitorStub
-