Package graphql.schema.validation
Class TypesImplementInterfaces
- java.lang.Object
-
- graphql.schema.GraphQLTypeVisitorStub
-
- graphql.schema.validation.TypesImplementInterfaces
-
- All Implemented Interfaces:
GraphQLTypeVisitor
public class TypesImplementInterfaces extends GraphQLTypeVisitorStub
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
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<? extends GraphQLImplementingType>,java.lang.String>
TYPE_OF_MAP
-
Constructor Summary
Constructors Constructor Description TypesImplementInterfaces()
-
Method Summary
-
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 Detail
-
TYPE_OF_MAP
private static final java.util.Map<java.lang.Class<? extends GraphQLImplementingType>,java.lang.String> TYPE_OF_MAP
-
-
Method Detail
-
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
private java.lang.String makeArgStr(GraphQLArgument argument)
-
error
private SchemaValidationError error(java.lang.String msg)
-
isCompatible
boolean isCompatible(GraphQLOutputType constraintType, GraphQLOutputType objectType)
- Returns:
true
if the specified implementingType satisfies the constraintType.
-
isSameType
boolean isSameType(GraphQLOutputType a, GraphQLOutputType b)
-
objectImplementsInterface
boolean objectImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLObjectType objectType)
-
interfaceImplementsInterface
boolean interfaceImplementsInterface(GraphQLInterfaceType interfaceType, GraphQLInterfaceType implementingType)
-
objectIsMemberOfUnion
boolean objectIsMemberOfUnion(GraphQLUnionType unionType, GraphQLOutputType objectType)
-
-