Module: GraphQL::StaticValidation
- Defined in:
- lib/graphql/static_validation/message.rb,
lib/graphql/static_validation/all_rules.rb,
lib/graphql/static_validation/validator.rb,
lib/graphql/static_validation/type_stack.rb,
lib/graphql/static_validation/literal_validator.rb,
lib/graphql/static_validation/validation_context.rb,
lib/graphql/static_validation/arguments_validator.rb,
lib/graphql/static_validation/definition_dependencies.rb,
lib/graphql/static_validation/rules/fields_will_merge.rb,
lib/graphql/static_validation/rules/fragments_are_used.rb,
lib/graphql/static_validation/rules/fragments_are_named.rb,
lib/graphql/static_validation/rules/fragment_types_exist.rb,
lib/graphql/static_validation/rules/fragments_are_finite.rb,
lib/graphql/static_validation/rules/mutation_root_exists.rb,
lib/graphql/static_validation/rules/arguments_are_defined.rb,
lib/graphql/static_validation/rules/directives_are_defined.rb,
lib/graphql/static_validation/rules/subscription_root_exists.rb,
lib/graphql/static_validation/rules/argument_names_are_unique.rb,
lib/graphql/static_validation/rules/fragment_names_are_unique.rb,
lib/graphql/static_validation/rules/operation_names_are_valid.rb,
lib/graphql/static_validation/rules/variable_names_are_unique.rb,
lib/graphql/static_validation/rules/variables_are_input_types.rb,
lib/graphql/static_validation/rules/fields_are_defined_on_type.rb,
lib/graphql/static_validation/rules/no_definitions_are_present.rb,
lib/graphql/static_validation/rules/variable_usages_are_allowed.rb,
lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb,
lib/graphql/static_validation/rules/required_arguments_are_present.rb,
lib/graphql/static_validation/rules/unique_directives_per_location.rb,
lib/graphql/static_validation/rules/variables_are_used_and_defined.rb,
lib/graphql/static_validation/rules/argument_literals_are_compatible.rb,
lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb,
lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb,
lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb,
lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb
Defined Under Namespace
Classes: ArgumentLiteralsAreCompatible, ArgumentNamesAreUnique, ArgumentsAreDefined, ArgumentsValidator, DefinitionDependencies, DirectivesAreDefined, DirectivesAreInValidLocations, FieldsAreDefinedOnType, FieldsHaveAppropriateSelections, FieldsWillMerge, FragmentNamesAreUnique, FragmentSpreadsArePossible, FragmentTypesExist, FragmentsAreFinite, FragmentsAreNamed, FragmentsAreOnCompositeTypes, FragmentsAreUsed, LiteralValidator, Message, MutationRootExists, NoDefinitionsArePresent, OperationNamesAreValid, RequiredArgumentsArePresent, SubscriptionRootExists, TypeStack, UniqueDirectivesPerLocation, ValidationContext, Validator, VariableDefaultValuesAreCorrectlyTyped, VariableNamesAreUnique, 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::NoDefinitionsArePresent, GraphQL::StaticValidation::DirectivesAreDefined, GraphQL::StaticValidation::DirectivesAreInValidLocations, GraphQL::StaticValidation::UniqueDirectivesPerLocation, GraphQL::StaticValidation::FragmentsAreFinite, GraphQL::StaticValidation::FragmentsAreNamed, GraphQL::StaticValidation::FragmentNamesAreUnique, GraphQL::StaticValidation::FragmentsAreUsed, GraphQL::StaticValidation::FragmentTypesExist, GraphQL::StaticValidation::FragmentsAreOnCompositeTypes, GraphQL::StaticValidation::FragmentSpreadsArePossible, GraphQL::StaticValidation::FieldsAreDefinedOnType, GraphQL::StaticValidation::FieldsWillMerge, GraphQL::StaticValidation::FieldsHaveAppropriateSelections, GraphQL::StaticValidation::ArgumentsAreDefined, GraphQL::StaticValidation::ArgumentLiteralsAreCompatible, GraphQL::StaticValidation::RequiredArgumentsArePresent, GraphQL::StaticValidation::ArgumentNamesAreUnique, GraphQL::StaticValidation::VariableNamesAreUnique, GraphQL::StaticValidation::VariablesAreInputTypes, GraphQL::StaticValidation::VariableDefaultValuesAreCorrectlyTyped, GraphQL::StaticValidation::VariablesAreUsedAndDefined, GraphQL::StaticValidation::VariableUsagesAreAllowed, GraphQL::StaticValidation::MutationRootExists, GraphQL::StaticValidation::SubscriptionRootExists, GraphQL::StaticValidation::OperationNamesAreValid, ]