Package graphql.validation.rules
Class PossibleFragmentSpreads
java.lang.Object
graphql.validation.AbstractRule
graphql.validation.rules.PossibleFragmentSpreads
-
Constructor Summary
ConstructorsConstructorDescriptionPossibleFragmentSpreads
(ValidationContext validationContext, ValidationErrorCollector validationErrorCollector) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkFragmentSpread
(FragmentSpread fragmentSpread) void
checkInlineFragment
(InlineFragment inlineFragment) private boolean
doTypesOverlap
(GraphQLType type, GraphQLCompositeType parent) private List
<? extends GraphQLType> getPossibleType
(GraphQLType type) private boolean
Per spec: The target type of fragment (type condition) must have kind UNION, INTERFACE, or OBJECT.Methods inherited from class graphql.validation.AbstractRule
addError, addError, addError, checkArgument, checkDirective, checkDocument, checkField, checkFragmentDefinition, checkObjectValue, checkOperationDefinition, checkSelectionSet, checkTypeName, checkVariable, checkVariableDefinition, documentFinished, getErrors, getQueryPath, getValidationContext, getValidationErrorCollector, getValidationUtil, i18n, i18n, isVisitFragmentSpreads, leaveOperationDefinition, leaveSelectionSet, setVisitFragmentSpreads, toString
-
Constructor Details
-
PossibleFragmentSpreads
public PossibleFragmentSpreads(ValidationContext validationContext, ValidationErrorCollector validationErrorCollector)
-
-
Method Details
-
checkInlineFragment
- Overrides:
checkInlineFragment
in classAbstractRule
-
checkFragmentSpread
- Overrides:
checkFragmentSpread
in classAbstractRule
-
doTypesOverlap
-
getPossibleType
-
isValidTargetCompositeType
Per spec: The target type of fragment (type condition) must have kind UNION, INTERFACE, or OBJECT.- Parameters:
type
- GraphQLType- Returns:
- true if it is a union, interface, or object.
-