Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #34

Merged
merged 1 commit into from
Oct 22, 2021
Merged

Version Packages #34

merged 1 commit into from
Oct 22, 2021

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Oct 22, 2021

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Patch Changes

  • 6188539: Use custom Promise.all implementation

    The GraphQL specification allows fields and list items to execute in parallel (except the root fields of a mutation operation). Node.JS does not actually allow true parallel threads of execution, but it can approach the performance benefit using asynchronous code and the event loop. In practice, returning a result containing asynchronous work uses the built in Node.JS Promise.all method, which awaits the results of all pending work prior to returning.

    In a case where completion of a field or list item value errors (i.e. the resolver returned an error, and the field or list item value is not nullable), the current implementation exits early, as only one error is returned to the client per field, as per the spec. This can lead to undetectable long-running promises on the server. The new implementation waits for all promises to settle, but does not use Promise.allSettled, in order to ensure that the first error to occur is always returned, even if there are multiple errors. See also Resolvers keep running even after one of them throws/rejects - consider Promise.allSettled? graphql/graphql-js#2974

    On success, the new implementation also modifies the existing object, rather than returning a new object, in order to improve performance.

  • 4e571e7: Switch graphql-js to peer dependency

@yaacovCR yaacovCR merged commit 31e6458 into main Oct 22, 2021
@yaacovCR yaacovCR deleted the changeset-release/main branch October 22, 2021 11:21
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.

1 participant