Module: GraphQL::StaticValidation
- Defined in:
- lib/graphql/static_validation.rb
Defined Under Namespace
Classes: ArgumentLiteralsAreCompatible, ArgumentsAreDefined, ArgumentsValidator, DirectivesAreDefined, FieldsAreDefinedOnType, FieldsHaveAppropriateSelections, FieldsWillMerge, FragmentSpreadsArePossible, FragmentTypesExist, FragmentsAreFinite, FragmentsAreOnCompositeTypes, FragmentsAreUsed, LiteralValidator, Message, RequiredArgumentsArePresent, TypeStack, Validator, VariableDefaultValuesAreCorrectlyTyped, VariableUsagesAreAllowed, VariablesAreInputTypes, VariablesAreUsedAndDefined
Constant Summary collapse
- ALL_RULES =
Default rules for Validator
Order is important here. Some validators return Language::Visitor::SKIP which stops the visit on that node. That way it doesn’t try to find fields on types that don’t exist, etc.
[ GraphQL::StaticValidation::DirectivesAreDefined, GraphQL::StaticValidation::FragmentsAreFinite, GraphQL::StaticValidation::FragmentTypesExist, GraphQL::StaticValidation::FragmentsAreOnCompositeTypes, GraphQL::StaticValidation::FragmentSpreadsArePossible, GraphQL::StaticValidation::FragmentsAreUsed, GraphQL::StaticValidation::FieldsAreDefinedOnType, GraphQL::StaticValidation::FieldsWillMerge, GraphQL::StaticValidation::FieldsHaveAppropriateSelections, GraphQL::StaticValidation::ArgumentsAreDefined, GraphQL::StaticValidation::ArgumentLiteralsAreCompatible, GraphQL::StaticValidation::RequiredArgumentsArePresent, GraphQL::StaticValidation::VariablesAreInputTypes, GraphQL::StaticValidation::VariableDefaultValuesAreCorrectlyTyped, GraphQL::StaticValidation::VariablesAreUsedAndDefined, GraphQL::StaticValidation::VariableUsagesAreAllowed, ]