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

Single place for AbortSignal listeners -> #6789 #6793

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented Dec 23, 2024

PR to #6789 PR

  • Single helper for AbortSignal event listener registration so it can be used by other packages, too.
  • Replace if(signal.aborted) throw logic with signal?.throwIfAborted
  • Check if there is only one listener registered to AbortSignal in tests
  • Shared rejection promise for AbortSignal instead of creating it multiple times

@ardatan ardatan requested a review from n1ru4l December 23, 2024 10:54
Copy link

changeset-bot bot commented Dec 23, 2024

🦋 Changeset detected

Latest commit: 56a5544

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@graphql-tools/utils Minor
@graphql-tools/executor Patch
@graphql-tools/graphql-tag-pluck Patch
@graphql-tools/import Patch
@graphql-tools/links Patch
@graphql-tools/load Patch
@graphql-tools/merge Patch
@graphql-tools/mock Patch
@graphql-tools/node-require Patch
@graphql-tools/relay-operation-optimizer Patch
@graphql-tools/resolvers-composition Patch
@graphql-tools/schema Patch
@graphql-tools/apollo-engine-loader Patch
@graphql-tools/code-file-loader Patch
@graphql-tools/git-loader Patch
@graphql-tools/github-loader Patch
@graphql-tools/graphql-file-loader Patch
@graphql-tools/json-file-loader Patch
@graphql-tools/module-loader Patch
@graphql-tools/url-loader Patch
@graphql-tools/executor-apollo-link Patch
@graphql-tools/executor-envelop Patch
@graphql-tools/executor-legacy-ws Patch
@graphql-tools/executor-urql-exchange Patch
@graphql-tools/executor-yoga Patch
graphql-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 23, 2024

💻 Website Preview

The latest changes are available as preview in: https://97615c8b.graphql-tools.pages.dev

@ardatan ardatan merged commit 2da2630 into fix-max-listener-warning Dec 24, 2024
12 checks passed
@ardatan ardatan deleted the single-place-for-listeners branch December 24, 2024 07:56
ardatan added a commit that referenced this pull request Dec 24, 2024
* fix: possible EventEmitter memory leak detected

* Single place for AbortSignal listeners -> #6789 (#6793)

* Single place for AbortSignal listeners

* Fix

* ..

* Lets go

* Small improvement

* Changeset for utils

* Update packages/executor/src/execution/__tests__/abort-signal.test.ts

---------

Co-authored-by: Arda TANRIKULU <[email protected]>
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