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 TypeMethodDescriptionvoidcheckFragmentSpread(FragmentSpread fragmentSpread) voidcheckInlineFragment(InlineFragment inlineFragment) private booleandoTypesOverlap(GraphQLType type, GraphQLCompositeType parent) private List<? extends GraphQLType> getPossibleType(GraphQLType type) private booleanPer 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:
checkInlineFragmentin classAbstractRule
-
checkFragmentSpread
- Overrides:
checkFragmentSpreadin 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.
-