Skip to content

Add description support for operations, fragments, variables and schemas - #925

Merged
milessabin merged 1 commit into
mainfrom
fix/op-desc
Aug 31, 2026
Merged

Add description support for operations, fragments, variables and schemas#925
milessabin merged 1 commit into
mainfrom
fix/op-desc

Conversation

@hugo-vrijswijk

Copy link
Copy Markdown
Contributor

The September 2025 GraphQL specification allows descriptions on every definition.

Adds description support on:

  • operations
  • fragment definitions
  • variable definitions
  • schema definitions (since September2025)

Also adds support for schema descriptions in the introspection system.

Six conformance test cases now pass.

Also rewrites the parser a little bit to only create Parser instances once, improving performance. Here is a very approximate benchmark:

document                  main      branch    change
query x1               38.1 us      4.8 us      7.9x
query x2               42.0 us      8.6 us      4.9x
query x4               47.8 us     15.4 us      3.1x
query x8               61.0 us     28.6 us      2.1x
query + fragment       35.9 us      5.1 us      7.0x
sdl, 7 defns          261.8 us     13.7 us     19.1x
schema defn            65.6 us      4.3 us     15.2x
introspection          82.7 us     50.3 us      1.6x

The September 2025 GraphQL specification allows descriptions on every definition.

Adds description support on:

- operations
- fragment definitions
- variable definitions
- schema definitions (since September2025)

Also adds support for schema descriptions in the introspection system.

Six conformance test cases now pass.

Also rewrites the parser a little bit to only create `Parser` instances once, improving performance. Here is a _very_ approximate benchmark:

```
document                  main      branch    change
query x1               38.1 us      4.8 us      7.9x
query x2               42.0 us      8.6 us      4.9x
query x4               47.8 us     15.4 us      3.1x
query x8               61.0 us     28.6 us      2.1x
query + fragment       35.9 us      5.1 us      7.0x
sdl, 7 defns          261.8 us     13.7 us     19.1x
schema defn            65.6 us      4.3 us     15.2x
introspection          82.7 us     50.3 us      1.6x
```

@milessabin milessabin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@milessabin
milessabin merged commit d3a5a3d into main Aug 31, 2026
23 checks passed
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.

2 participants