fix(diagnostics): emit asyncStart after promise settlement to match native tracePromise#4824
Merged
yaacovCR merged 1 commit intoJun 16, 2026
Conversation
|
@logaretm is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
@logaretm => agreed, this fix matches the docs. |
yaacovCR
added a commit
to yaacovCR/graphql-js
that referenced
this pull request
Jun 16, 2026
## v17.0.1 (2026-06-16) #### Bug Fix 🐞 * [graphql#4824](graphql#4824) fix(diagnostics): emit asyncStart after promise settlement to match native `tracePromise` ([@logaretm](https://github.com/logaretm)) #### Internal 🏠 <details> <summary> 2 PRs were merged </summary> * [graphql#4823](graphql#4823) chore(npm): remove obsolete ESM-only package build ([@yaacovCR](https://github.com/yaacovCR)) * [graphql#4825](graphql#4825) chore(release): protect latest release channels ([@yaacovCR](https://github.com/yaacovCR)) </details> #### Committers: 2 * Abdelrahman Awad([@logaretm](https://github.com/logaretm)) * Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
yaacovCR
added a commit
that referenced
this pull request
Jun 16, 2026
## v17.0.1 (2026-06-16) #### Bug Fix 🐞 * [#4824](#4824) fix(diagnostics): emit asyncStart after promise settlement to match native `tracePromise` ([@logaretm](https://github.com/logaretm)) #### Internal 🏠 <details> <summary> 2 PRs were merged </summary> * [#4823](#4823) chore(npm): remove obsolete ESM-only package build ([@yaacovCR](https://github.com/yaacovCR)) * [#4825](#4825) chore(release): protect latest release channels ([@yaacovCR](https://github.com/yaacovCR)) </details> #### Committers: 2 * Abdelrahman Awad([@logaretm](https://github.com/logaretm)) * Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
Contributor
|
@logaretm released in 17.0.1 => thanks for catching this so quickly! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@yaacovCR This is a minor correction for
traceMixedthat was introduced in #4670Once v17 RC was released, I made a round of tests against the observability ecosystem. One thing that I noticed was that OTEL's proposed API for tracing channels in open-telemetry/opentelemetry-js#6387 was mis-parenting async resolvers sometimes.
The reason for this was
asyncStartwas emitted when the promise was first returned, rather than when the promise settled. Emitting it early meant subscribers that temporarily activate context between asyncStart and asyncEnd could leak that context into overlapping sibling operations.This did not show up in earlier tests because most subscribers only used
startfor context creation andasyncEndfor completion. This should not be a breaking change because the terminalend/asyncEndsemantics and result/error payloads remain the same. This is an invisible change for most users, and is only correcting a slight mismatch.We had to manually implement the async lifecycle in
traceMixedhere because we needed to preserve thesync/asyncreturn paths in resolvers.I discussed this with @Qard and this should be a more faithful implementation to how
tracePromiseworks under the hood timing-wise.