Package graphql.schema.validation
Class TypesImplementInterfaces
java.lang.Object
graphql.schema.GraphQLTypeVisitorStub
graphql.schema.validation.TypesImplementInterfaces
- All Implemented Interfaces:
GraphQLTypeVisitor
Schema validation rule ensuring object and interface types have all the fields that they need to
implement the interfaces they say they implement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map
<Class<? extends GraphQLImplementingType>, String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
check
(GraphQLImplementingType implementingType, SchemaValidationErrorCollector validationErrorCollector) private void
checkFieldArgumentEquivalence
(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) private void
checkFieldTypeCompatibility
(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) private void
checkObjectImplementsInterface
(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) private void
checkTransitiveImplementations
(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) private SchemaValidationError
(package private) boolean
interfaceImplementsInterface
(GraphQLInterfaceType interfaceType, GraphQLInterfaceType implementingType) (package private) boolean
isCompatible
(GraphQLOutputType constraintType, GraphQLOutputType objectType) (package private) boolean
private String
makeArgStr
(GraphQLArgument argument) (package private) boolean
objectImplementsInterface
(GraphQLInterfaceType interfaceType, GraphQLObjectType objectType) (package private) boolean
objectIsMemberOfUnion
(GraphQLUnionType unionType, GraphQLOutputType objectType) visitGraphQLInterfaceType
(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLObjectType
(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) Methods inherited from class graphql.schema.GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLDirective, visitGraphQLEnumType, visitGraphQLEnumValueDefinition, visitGraphQLFieldDefinition, visitGraphQLInputObjectField, visitGraphQLInputObjectType, visitGraphQLList, visitGraphQLNonNull, 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
-
TYPE_OF_MAP
-
-
Constructor Details
-
TypesImplementInterfaces
public TypesImplementInterfaces()
-
-
Method Details
-
visitGraphQLObjectType
public TraversalControl visitGraphQLObjectType(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLObjectType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLObjectType
in classGraphQLTypeVisitorStub
-
visitGraphQLInterfaceType
public TraversalControl visitGraphQLInterfaceType(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInterfaceType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLInterfaceType
in classGraphQLTypeVisitorStub
-
check
private void check(GraphQLImplementingType implementingType, SchemaValidationErrorCollector validationErrorCollector) -
checkObjectImplementsInterface
private void checkObjectImplementsInterface(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) -
checkTransitiveImplementations
private void checkTransitiveImplementations(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) -
checkFieldTypeCompatibility
private void checkFieldTypeCompatibility(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) -
checkFieldArgumentEquivalence
private void checkFieldArgumentEquivalence(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) -
makeArgStr
-
error
-
isCompatible
- Returns:
true
if the specified implementingType satisfies the constraintType.
-
isSameType
-
objectImplementsInterface
-
interfaceImplementsInterface
boolean interfaceImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLInterfaceType implementingType) -
objectIsMemberOfUnion
-