Skip to content

Draft: Schema validation Wip

Ghost User requested to merge schema_validation into main

This Wip MR aims to prove out schema validation according to spec

It is designed to be rewritten, ideally with a strategy that makes as few passes over the document as possible.

Will fix rubocops after rewriting it.

  • 5.1 Documents
    • 5.1.1 Executable definitions
  • 5.2 Operations
    • 5.2.1 Named operation defs
    • 5.2.2 Anonymous operation defs
    • 5.2.3 Subscription operation defs
  • 5.3 Fields
    • 5.3.1 Field selections
    • 5.3.2 Field selection merging
    • 5.3.3 Leaf field selections
  • 5.4 Arguments
    • 5.4.1 Argument names
    • 5.4.2 Argument uniqueness
      • 5.4.2.1 Required Args
  • 5.5 Fragments
    • 5.5.1 Fragment Declarations
      • 5.5.1.1 Fragment name uniqueness
      • 5.5.1.2 Fragment spread type existence
      • 5.5.1.3 Fragments on composite types
      • 5.5.1.4 Fragments must be used
    • 5.5.2 Fragment spreads
      • 5.5.2.1 Fragment spread target defined
      • 5.5.2.2 Fragment spreads must not form cycles
      • 5.5.2.3 Fragment spread is possible
        • 5.5.2.3.1 Object spreads in object scope
        • 5.5.2.3.2 Abstract spreads in object scope
        • 5.5.2.3.3 Object spreads in abstract scope
        • 5.5.2.3.4 Abstract spreads in abstract scope
  • 5.6 Values
    • 5.6.1 values of correct type
    • 5.6.2 Input object field names
    • 5.6.3 Input object field uniqueness
    • 5.6.4 Input object required fields
  • 5.7 Directives
    • 5.7.1 Directives are defined
    • 5.7.2 Directives are in valid locations
    • 5.7.3 Directives are unique per location
  • 5.8 Variables
    • 5.8.1 Variable uniqueness
    • 5.8.2 Variables are input types
    • 5.8.3 All variable uses defined
    • 5.8.4 All variables used
    • 5.8.5 All variable usages are allowed.
Edited by Ghost User

Merge request reports