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 voidcheck(GraphQLImplementingType implementingType, SchemaValidationErrorCollector validationErrorCollector) private voidcheckFieldArgumentEquivalence(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) private voidcheckFieldTypeCompatibility(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector, GraphQLFieldDefinition interfaceFieldDef, GraphQLFieldDefinition objectFieldDef) private voidcheckObjectImplementsInterface(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) private voidcheckTransitiveImplementations(GraphQLImplementingType implementingType, GraphQLInterfaceType interfaceType, SchemaValidationErrorCollector validationErrorCollector) private SchemaValidationError(package private) booleaninterfaceImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLInterfaceType implementingType) (package private) booleanisCompatible(GraphQLOutputType constraintType, GraphQLOutputType objectType) (package private) booleanprivate StringmakeArgStr(GraphQLArgument argument) (package private) booleanobjectImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLObjectType objectType) (package private) booleanobjectIsMemberOfUnion(GraphQLUnionType unionType, GraphQLOutputType objectType) visitGraphQLInterfaceType(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) visitGraphQLObjectType(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) Methods inherited from class GraphQLTypeVisitorStub
visitGraphQLAppliedDirective, visitGraphQLAppliedDirectiveArgument, visitGraphQLArgument, visitGraphQLDirective, visitGraphQLEnumType, visitGraphQLEnumValueDefinition, visitGraphQLFieldDefinition, visitGraphQLInputObjectField, visitGraphQLInputObjectType, visitGraphQLList, visitGraphQLNonNull, 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
-
TYPE_OF_MAP
-
-
Constructor Details
-
TypesImplementInterfaces
public TypesImplementInterfaces()
-
-
Method Details
-
visitGraphQLObjectType
public TraversalControl visitGraphQLObjectType(GraphQLObjectType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLObjectTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLObjectTypein classGraphQLTypeVisitorStub
-
visitGraphQLInterfaceType
public TraversalControl visitGraphQLInterfaceType(GraphQLInterfaceType type, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInterfaceTypein interfaceGraphQLTypeVisitor- Overrides:
visitGraphQLInterfaceTypein 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:
trueif the specified implementingType satisfies the constraintType.
-
isSameType
-
objectImplementsInterface
-
interfaceImplementsInterface
boolean interfaceImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLInterfaceType implementingType) -
objectIsMemberOfUnion
-