Skip to content

Commit

Permalink
Changeset for utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 24, 2024
1 parent 492d992 commit 56a5544
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/hip-bikes-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@graphql-tools/utils': minor
---

- New helper function `getAbortPromise` to get a promise rejected when `AbortSignal` is aborted
- New helper function `registerAbortSignalListener` to register a listener to abort a promise when `AbortSignal` is aborted

Instead of using `.addEventListener('abort', () => {/* ... */})`, we register a single listener to avoid warnings on Node.js like `MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added. Use emitter.setMaxListeners() to increase limit`.

0 comments on commit 56a5544

Please sign in to comment.