Skip to content

Add conformance test suites from September 2025 GraphQL specification - #910

Open
hugo-vrijswijk wants to merge 1 commit into
mainfrom
conformance-suite-2
Open

Add conformance test suites from September 2025 GraphQL specification#910
hugo-vrijswijk wants to merge 1 commit into
mainfrom
conformance-suite-2

Conversation

@hugo-vrijswijk

@hugo-vrijswijk hugo-vrijswijk commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes #26

Introduces a ConformanceSuite and a number of test suites based on examples from the September 2025 GraphQL specification. Roughly, each suite corresponds to a section of the specification, and each test case corresponds to an example or counter-example in the specification text.

The suites cover every example, including the examples which currently fail. Each failing case carries a .fail marker. The markers record the current conformance status as a baseline. Out of 221 cases, 31 currently fail. Issue #908 will close 3 of them. Some cases fail because of small bugs. Others fail because a feature is missing, such as allowing description on the root schema. Others fail because of missing minor validations.

The suites use these test helpers:

  • parses to check that a document parses
  • validSchema/invalidSchema to check the validation of a schema
  • validQuery/invalidQuery to check the validation of a query
  • yields to run a query against a mapping and compare the response
  • yieldsFieldOrder to run a query against a mapping and compare the order of the response fields

Extracting the conformance suite from the spec was done by AI, but all code has been read, reviewed and understood by me.

Closes #26

Introduces a `ConformanceSuite` and a number of test suites based on examples from the September 2025 GraphQL specification. Roughly, each suite corresponds to a section of the specification, and each test case corresponds to an example or counter-example in the specification text.

The suites cover every example, including the examples which currently fail. Each failing case carries a `.fail` marker. The markers record the current conformance status as a baseline. Out of 221 cases, 31 currently fail. Issue #908 will close 3 of them. Some cases fail because of small bugs. Others fail because a feature is missing, such as allowing `description` on the root schema. Others fail because of missing minor validations.

The suites use these test helpers:

- `parses` to check that a document parses
- `validSchema`/`invalidSchema` to check the validation of a schema
- `validQuery`/`invalidQuery` to check the validation of a query
- `yields` to run a query against a mapping and compare the response
- `yieldsFieldOrder` to run a query against a mapping and compare the order of the response fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract test suite from spec and reference implementation

1 participant