feat(graphql): trace graphql-jit executions - #9343
Conversation
Overall package sizeSelf size: 8.63 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2026-08-31 16:45:06 Comparing candidate commit 3dcd795 in PR branch Found 1 performance improvements and 1 performance regressions! Performance is the same for 2296 metrics, 12 unstable metrics.
|
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 3dcd795 | Docs | View more details | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9343 +/- ##
==========================================
+ Coverage 98.61% 98.62% +0.01%
==========================================
Files 993 996 +3
Lines 150186 151955 +1769
Branches 13603 13211 -392
==========================================
+ Hits 148099 149869 +1770
+ Misses 2087 2086 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
15d9920 to
be5b1a7
Compare
ac0a85f to
adf07fd
Compare
19e5af4 to
29ce982
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 269e87cf36
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
269e87c to
f134e53
Compare
e66ad87 to
e7afa0e
Compare
e7afa0e to
4b9cec2
Compare
The Orchestrion transforms change both the compiler AST and generated query source, so no single code path shows their state handoff.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df5c217fd5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a087bd636
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The compiler already serializes static arguments before this check, so a second key scan allocates an array for each compiled default field.\n\nUse the exact empty-object source because a custom scalar named `toJSON` can produce another two-character serialization.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a518b59a64
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
bengl
left a comment
There was a problem hiding this comment.
This is all very complex and painful, but I don't see a better way.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7c2e97b20
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Collapsed JIT default fields bypass the shared resolver store after the first property read, so traced work from later getter reads is parented to the execute span. graphql-jit can emit the property read multiple times, so preserve its read cardinality while entering the shared field context for every occurrence.
npm includes nested plugin READMEs through the package files globs while Bun excludes them, so the packers otherwise produce different artifacts.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b56fc1f37
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…-trace-graphql-jit
graphql-jit reads one inline default field several times while completing a value. Rewriting each read published duplicate resolver events and created duplicate spans. Later completion reads stay in the first resolver store. This preserves getter span parenting without starting another resolver.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20446415b7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…-trace-graphql-jit
Resolver subscribers force every compiled default-field invocation through the runtime. Reused list items then read getters after the collapsed resolver scope has been restored, so child spans attach to the execute span. On Node 22.23.2 with V8 12.4, a 100-item graphql-jit 0.8.4 query measured 65.541 us before and 26.007 us after. The required scope check changed graphql-jit 0.8.8 from 20.541 us to 22.931 us for the same workload.
Summary
graphql-jit bypasses graphql.execute after compilation, which drops GraphQL spans on warm requests. This instruments compiled queries across the supported 0.7.x and 0.8.x CJS and ESM layouts so execute and resolve spans, pre-execution blocking, and Mercurius request metadata stay available.
Test plan
Fixes: #2385