Skip to content

fix(graphql): record collapsed JIT resolver errors - #10027

Merged
bengl merged 4 commits into
masterfrom
BridgeAR/2026-08-27-graphql-compiler-errors
Sep 3, 2026
Merged

bengl merged 4 commits into
masterfrom
BridgeAR/2026-08-27-graphql-compiler-errors

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Collapsed GraphQL JIT fields observe only the first resolver completion. A later list sibling can fail without marking the shared span or resolve hook.

The compiler records later failures in the existing synchronous and asynchronous error branches. Compiler-owned dispatch avoids a completion observer and resolver wrapper on the hot path.

On Node 24.18.0 and V8 13.6, a 50,000-item collapsed query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.

@BridgeAR
BridgeAR requested a review from a team as a code owner August 27, 2026 16:07
@BridgeAR
BridgeAR requested review from tlhunter and removed request for a team August 27, 2026 16:07
@dd-octo-sts

dd-octo-sts Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.75 MB
Deduped: 9.41 MB
No deduping: 9.41 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

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 98.63% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 830b1da | Docs | View more details | Give us feedback!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e73739c90

ℹ️ 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".

Comment thread packages/datadog-plugin-graphql/src/execute.js Outdated
@pr-commenter

pr-commenter Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-02 20:29:37

Comparing candidate commit 830b1da in PR branch BridgeAR/2026-08-27-graphql-compiler-errors with baseline commit 43d2112 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2314 metrics, 14 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-24

  • unstable max_rss_usage [-27.873MB; +8.301MB] or [-8.432%; +2.511%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-21.047MB; +29.916MB] or [-5.514%; +7.837%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable max_rss_usage [-7.785MB; +21.736MB] or [-3.141%; +8.770%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-259.357ms; +465.162ms] or [-5.284%; +9.477%]
  • unstable execution_time [-259.802ms; +466.646ms] or [-5.207%; +9.353%]
  • unstable throughput [-154687.563op/s; +89885.947op/s] or [-9.193%; +5.342%]

scenario:encoders-0.4-immediate-flush-20

  • unstable max_rss_usage [-9.987MB; +7.535MB] or [-12.822%; +9.674%]

scenario:llmobs-encode-unicode-mixed-20

  • unstable max_rss_usage [-12.176MB; +5.848MB] or [-15.266%; +7.332%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-24

  • unstable cpu_usage_percentage [-7.336%; +3.695%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-26

  • unstable cpu_usage_percentage [-5.419%; +4.699%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable max_rss_usage [-7.356MB; +12.166MB] or [-5.000%; +8.270%]

scenario:plugin-pg-service-24

  • unstable cpu_usage_percentage [-6.303%; +5.043%]
  • unstable execution_time [-132.126ms; +155.338ms] or [-7.812%; +9.184%]
  • unstable throughput [-250124.125op/s; +220953.551op/s] or [-6.970%; +6.157%]

@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (43d2112) to head (830b1da).

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #10027    +/-   ##
========================================
  Coverage   98.63%   98.63%            
========================================
  Files        1002     1002            
  Lines      154895   155112   +217     
  Branches    13277    13675   +398     
========================================
+ Hits       152777   152994   +217     
  Misses       2118     2118            
Flag Coverage Δ
aiguard 63.83% <ø> (-0.03%) ⬇️
aiguard-integration 58.88% <6.55%> (-0.07%) ⬇️
apm-capabilities-tracing 62.84% <45.97%> (-0.02%) ⬇️
apm-integrations-aerospike 61.24% <ø> (-0.03%) ⬇️
apm-integrations-aerospike-_integrat-1d185c06 63.21% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka--d0bf0045 67.31% <ø> (-0.03%) ⬇️
apm-integrations-couchbase 61.74% <ø> (-0.03%) ⬇️
apm-integrations-elasticsearch_integ-31b69669 68.57% <ø> (-0.03%) ⬇️
apm-integrations-http 66.84% <ø> (-0.03%) ⬇️
apm-integrations-http2_integrations--9aea12f5 68.17% <ø> (-0.03%) ⬇️
apm-integrations-kafkajs 67.89% <ø> (-0.03%) ⬇️
apm-integrations-next 64.90% <ø> (-0.03%) ⬇️
apm-integrations-prisma 62.49% <ø> (-0.03%) ⬇️
apm-integrations-restify_integration-b312dd16 65.02% <ø> (-0.03%) ⬇️
appsec 77.30% <ø> (-0.02%) ⬇️
appsec-express_fastify_graphql 72.60% <45.58%> (-0.12%) ⬇️
appsec-integration 49.53% <41.17%> (-0.02%) ⬇️
appsec-kafka_ldapjs_lodash 67.98% <ø> (-0.03%) ⬇️
appsec-mongodb-core_mongoose_mysql 71.12% <ø> (-0.02%) ⬇️
appsec-next 57.69% <ø> (-0.02%) ⬇️
appsec-node-serialize_passport_postgres 70.61% <ø> (-0.02%) ⬇️
appsec-sourcing_stripe_template 69.05% <ø> (-0.02%) ⬇️
debugger 69.77% <ø> (-0.03%) ⬇️
instr-ai_instrumentation-anthropic-l-e862da55 56.60% <ø> (-0.03%) ⬇️
instr-bluebird_instrumentation-body--02ae4b41 64.84% <ø> (-0.03%) ⬇️
instr-confluentinc-kafka-javascript 56.00% <ø> (-0.03%) ⬇️
instr-connect_instrumentation-cookie-0bbb44d9 57.70% <ø> (-0.03%) ⬇️
instr-couchbase 55.22% <ø> (-0.03%) ⬇️
instr-cypress-config_instrumentation-4db1de46 58.02% <ø> (-0.03%) ⬇️
instr-express-multi-version_instrume-f5caf487 64.31% <ø> (-0.03%) ⬇️
instr-fetch_instrumentation-fs_instr-43dfe6a2 50.55% <ø> (-0.02%) ⬇️
instr-hono_instrumentation-http_inst-026a5d4d 66.16% <ø> (-0.03%) ⬇️
instr-kafkajs_instrumentation-knex_i-ca6f5b19 56.66% <ø> (-0.03%) ⬇️
instr-light-my-request_instrumentati-8c9fceca 63.61% <ø> (-0.03%) ⬇️
instr-mysql_instrumentation-mysql2_i-05f94c42 59.11% <ø> (-0.03%) ⬇️
instr-openai-lifecycle_instrumentati-783580bd 65.96% <ø> (-0.03%) ⬇️
instr-passport-http_instrumentation--2b6c8eb6 66.58% <ø> (-0.03%) ⬇️
instr-promise_instrumentation-promis-8479bae3 56.43% <ø> (-0.03%) ⬇️
instr-restify_instrumentation-router-5641467c 56.58% <ø> (-0.03%) ⬇️
instr-url_instrumentation-when_instr-22ca7078 56.46% <ø> (-0.03%) ⬇️
instrumentations-integration-esbuild 34.68% <ø> (ø)
llmobs-ai_anthropic_bedrock 66.76% <6.55%> (-0.09%) ⬇️
llmobs-claude-agent-sdk_google-genai-da2c851e 64.92% <6.55%> (-0.09%) ⬇️
llmobs-openai 66.73% <6.55%> (-0.10%) ⬇️
llmobs-openai-agents_vertex-ai 64.06% <6.55%> (-0.11%) ⬇️
llmobs-sdk 76.58% <ø> (-0.03%) ⬇️
master-coverage 98.63% <100.00%> (?)
openfeature 60.12% <ø> (ø)
openfeature-unit 58.85% <ø> (-0.03%) ⬇️
platform-core_esbuild_instrumentations-misc 41.33% <6.55%> (-0.04%) ⬇️
platform-integration 65.22% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 39.10% <ø> (-0.02%) ⬇️
plugins-aws-durable-execution-sdk-js-2bc88c07 61.06% <6.55%> (-0.10%) ⬇️
plugins-azure-event-hubs_azure-servi-50d5b0fc 58.53% <ø> (ø)
plugins-browser-bunyan_bullmq_cassandra 66.28% <6.55%> (-0.11%) ⬇️
plugins-cookie_cookie-parser_crypto 56.20% <ø> (-0.03%) ⬇️
plugins-dd-trace-api_express-mongo-s-83827a5c 61.79% <ø> (-0.03%) ⬇️
plugins-fastify_fetch_fs 66.01% <ø> (-0.03%) ⬇️
plugins-generic-pool_google-cloud-pubsub_grpc 69.55% <ø> (-0.03%) ⬇️
plugins-handlebars_hapi_hono 64.28% <ø> (-0.03%) ⬇️
plugins-ioredis_knex_langgraph 61.89% <6.55%> (-0.11%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 63.99% <ø> (-0.03%) ⬇️
plugins-lodash_mariadb_memcached 64.45% <ø> (-0.03%) ⬇️
plugins-mercurius_microgateway-core_-b9bd83c4 67.95% <93.75%> (+0.09%) ⬆️
plugins-moleculer_mongodb_mongodb-core 66.71% <ø> (-0.03%) ⬇️
plugins-mongoose_multer_mysql 64.56% <ø> (-0.03%) ⬇️
plugins-mysql2_nats_node-serialize 66.80% <ø> (-0.03%) ⬇️
plugins-opensearch_passport-http_pino 64.70% <ø> (-0.03%) ⬇️
plugins-postgres_process_pug 63.74% <ø> (-0.03%) ⬇️
plugins-redis_router_sequelize 67.28% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-amqp10_tes-914101e2 65.39% <37.13%> (-0.13%) ⬇️
plugins-test-and-upstream-avsc_test--408e8d3a 65.61% <ø> (-0.04%) ⬇️
plugins-test-and-upstream-graphql_te-59dd94de 69.00% <100.00%> (+0.13%) ⬆️
plugins-test-and-upstream-rhea_undici_url 66.60% <ø> (-0.03%) ⬇️
plugins-valkey_vm_winston 63.07% <ø> (+0.02%) ⬆️
plugins-ws 65.13% <ø> (-0.03%) ⬇️
profiling 66.69% <ø> (-0.03%) ⬇️
serverless-aws-sdk-aws-sdk 55.96% <ø> (-0.02%) ⬇️
serverless-aws-sdk-base-inject-field 55.77% <ø> (-0.03%) ⬇️
serverless-aws-sdk-bedrockruntime 59.31% <ø> (-0.03%) ⬇️
serverless-aws-sdk-client 60.67% <ø> (-0.03%) ⬇️
serverless-aws-sdk-dynamodb 59.75% <ø> (-0.02%) ⬇️
serverless-aws-sdk-eventbridge 58.14% <ø> (-0.02%) ⬇️
serverless-aws-sdk-kinesis 63.69% <ø> (-0.03%) ⬇️
serverless-aws-sdk-lambda 61.67% <ø> (-0.03%) ⬇️
serverless-aws-sdk-s3 59.79% <ø> (-0.03%) ⬇️
serverless-aws-sdk-serverless-peer-service 64.25% <ø> (-0.03%) ⬇️
serverless-aws-sdk-sns 64.57% <ø> (-0.03%) ⬇️
serverless-aws-sdk-sqs 65.03% <ø> (-0.03%) ⬇️
serverless-aws-sdk-stepfunctions 59.65% <ø> (-0.03%) ⬇️
serverless-aws-sdk-util 56.40% <ø> (-0.03%) ⬇️
serverless-azure-durable-functions_a-776237ee 57.62% <6.55%> (-0.07%) ⬇️
serverless-azure-functions-eventhubs-61ee6313 64.32% <ø> (-0.03%) ⬇️
test-optimization-cucumber 70.43% <ø> (+0.02%) ⬆️
test-optimization-cypress 64.82% <ø> (+0.03%) ⬆️
test-optimization-jest 72.09% <ø> (+0.24%) ⬆️
test-optimization-mocha 71.90% <ø> (+0.05%) ⬆️
test-optimization-playwright-playwri-363e40a6 59.66% <6.55%> (+0.03%) ⬆️
test-optimization-playwright-playwri-5141d36d 61.17% <6.55%> (-0.07%) ⬇️
test-optimization-playwright-playwri-5b35813b 59.55% <6.55%> (-0.07%) ⬇️
test-optimization-playwright-playwri-924f4516 60.83% <6.55%> (-0.10%) ⬇️
test-optimization-playwright-playwri-d6f5a99b 59.43% <6.55%> (-0.05%) ⬇️
test-optimization-playwright-playwright-atr 59.16% <6.55%> (-0.07%) ⬇️
test-optimization-playwright-playwright-efd 60.08% <6.55%> (-0.07%) ⬇️
test-optimization-selenium 58.79% <ø> (-0.06%) ⬇️
test-optimization-testopt 61.40% <6.55%> (-0.02%) ⬇️
test-optimization-vitest 72.48% <ø> (+0.08%) ⬆️
test-optimization-vitest-browser 58.29% <6.55%> (-0.09%) ⬇️
test-optimization-webdriverio 65.82% <6.55%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from BridgeAR/2026-07-14-trace-graphql-jit to master August 31, 2026 16:50
@gitsync-ddbuild-stable6
gitsync-ddbuild-stable6 Bot requested a review from a team as a code owner August 31, 2026 16:50
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-27-graphql-compiler-errors branch from 94adf26 to b110429 Compare August 31, 2026 16:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b110429e15

ℹ️ 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".

Comment thread packages/datadog-plugin-graphql/src/execute.js
Comment thread packages/datadog-plugin-graphql/src/execute.js Outdated
Comment thread packages/datadog-plugin-graphql/src/execute.js
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-27-graphql-compiler-errors branch 2 times, most recently from b43eb93 to a970105 Compare August 31, 2026 20:49
Collapsed JIT fields observe only the first resolver completion, so a later sibling error leaves the shared span and resolve hook successful.

Compiler-side error recording preserves one resolve-hook call without adding a completion observer to every resolver. On Node 24.18.0 and V8 13.6, a 50,000-item query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.
`depth: 0` still entered compiled resolver instrumentation because generated dispatch only checked whether an execution context existed.

On Node 24.9.0 and V8 13.6, a 50,000-item query improved from 37.5–37.7 to 21.1–21.4 ns per resolver.
Collapsed JIT fields defer resolver hooks until execution completes, so the execute hook must run after the deferred resolver hooks.
Resolver-call shape is fixed in the upstream compiler source, so validating each compiled field retained a fallback for a module the rewriter had already accepted.

Rewriter assertions now reject unsupported source before instrumentation and let the loader use the original module.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-27-graphql-compiler-errors branch from a970105 to 830b1da Compare September 2, 2026 20:18
@bengl
bengl enabled auto-merge (squash) September 3, 2026 20:57
@bengl
bengl merged commit 79d1f69 into master Sep 3, 2026
707 of 708 checks passed
@bengl
bengl deleted the BridgeAR/2026-08-27-graphql-compiler-errors branch September 3, 2026 20:57
This was referenced Sep 3, 2026
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 3, 2026
* fix(graphql): record collapsed JIT resolver errors

Collapsed JIT fields observe only the first resolver completion, so a later sibling error leaves the shared span and resolve hook successful.

Compiler-side error recording preserves one resolve-hook call without adding a completion observer to every resolver. On Node 24.18.0 and V8 13.6, a 50,000-item query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.

* perf(graphql): restore disabled JIT resolver fast path

`depth: 0` still entered compiled resolver instrumentation because generated dispatch only checked whether an execution context existed.

On Node 24.9.0 and V8 13.6, a 50,000-item query improved from 37.5–37.7 to 21.1–21.4 ns per resolver.

* fix(graphql): preserve resolver hook order

Collapsed JIT fields defer resolver hooks until execution completes, so the execute hook must run after the deferred resolver hooks.

* refactor(graphql): validate JIT resolver source in rewriter

Resolver-call shape is fixed in the upstream compiler source, so validating each compiled field retained a fallback for a module the rewriter had already accepted.

Rewriter assertions now reject unsupported source before instrumentation and let the loader use the original module.
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 3, 2026
* fix(graphql): record collapsed JIT resolver errors

Collapsed JIT fields observe only the first resolver completion, so a later sibling error leaves the shared span and resolve hook successful.

Compiler-side error recording preserves one resolve-hook call without adding a completion observer to every resolver. On Node 24.18.0 and V8 13.6, a 50,000-item query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.

* perf(graphql): restore disabled JIT resolver fast path

`depth: 0` still entered compiled resolver instrumentation because generated dispatch only checked whether an execution context existed.

On Node 24.9.0 and V8 13.6, a 50,000-item query improved from 37.5–37.7 to 21.1–21.4 ns per resolver.

* fix(graphql): preserve resolver hook order

Collapsed JIT fields defer resolver hooks until execution completes, so the execute hook must run after the deferred resolver hooks.

* refactor(graphql): validate JIT resolver source in rewriter

Resolver-call shape is fixed in the upstream compiler source, so validating each compiled field retained a fallback for a module the rewriter had already accepted.

Rewriter assertions now reject unsupported source before instrumentation and let the loader use the original module.
BridgeAR added a commit that referenced this pull request Sep 4, 2026
* fix(graphql): record collapsed JIT resolver errors

Collapsed JIT fields observe only the first resolver completion, so a later sibling error leaves the shared span and resolve hook successful.

Compiler-side error recording preserves one resolve-hook call without adding a completion observer to every resolver. On Node 24.18.0 and V8 13.6, a 50,000-item query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.

* perf(graphql): restore disabled JIT resolver fast path

`depth: 0` still entered compiled resolver instrumentation because generated dispatch only checked whether an execution context existed.

On Node 24.9.0 and V8 13.6, a 50,000-item query improved from 37.5–37.7 to 21.1–21.4 ns per resolver.

* fix(graphql): preserve resolver hook order

Collapsed JIT fields defer resolver hooks until execution completes, so the execute hook must run after the deferred resolver hooks.

* refactor(graphql): validate JIT resolver source in rewriter

Resolver-call shape is fixed in the upstream compiler source, so validating each compiled field retained a fallback for a module the rewriter had already accepted.

Rewriter assertions now reject unsupported source before instrumentation and let the loader use the original module.
BridgeAR added a commit that referenced this pull request Sep 4, 2026
* fix(graphql): record collapsed JIT resolver errors

Collapsed JIT fields observe only the first resolver completion, so a later sibling error leaves the shared span and resolve hook successful.

Compiler-side error recording preserves one resolve-hook call without adding a completion observer to every resolver. On Node 24.18.0 and V8 13.6, a 50,000-item query improved from 87.8–90.9 to 45.8–48.9 ns per resolver.

* perf(graphql): restore disabled JIT resolver fast path

`depth: 0` still entered compiled resolver instrumentation because generated dispatch only checked whether an execution context existed.

On Node 24.9.0 and V8 13.6, a 50,000-item query improved from 37.5–37.7 to 21.1–21.4 ns per resolver.

* fix(graphql): preserve resolver hook order

Collapsed JIT fields defer resolver hooks until execution completes, so the execute hook must run after the deferred resolver hooks.

* refactor(graphql): validate JIT resolver source in rewriter

Resolver-call shape is fixed in the upstream compiler source, so validating each compiled field retained a fallback for a module the rewriter had already accepted.

Rewriter assertions now reject unsupported source before instrumentation and let the loader use the original module.
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