-
Notifications
You must be signed in to change notification settings - Fork 23
fix(executor-http): avoid shared AbortController
in Cloudflare Workers
#1347
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue in the HTTP executor where a shared AbortController
causes "Cannot perform I/O on behalf of a different request" errors in Cloudflare Workers environments. The fix conditionally creates the AbortController
based on the runtime environment and handles the case where it may be undefined.
Key changes:
- Conditionally create
AbortController
to avoid Cloudflare Workers compatibility issues - Add null-safe checks for
disposeCtrl
throughout the affected code paths - Handle empty signals array when creating the combined abort signal
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/executors/http/src/index.ts | Implements conditional AbortController creation and adds null-safety checks |
.changeset/lovely-coins-dream.md | Documents the bug fix for Cloudflare Workers compatibility |
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-tools/batch-delegate |
9.0.40-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/batch-execute |
9.0.18-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/delegate |
10.2.22-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-common |
0.0.5-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-graphql-ws |
2.0.6-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-http |
2.0.4-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/federation |
3.2.7-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/fusion-runtime |
0.11.18-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway |
1.16.0-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/logger-json |
0.0.6-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/nestjs |
1.0.19-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-aws-sigv4 |
1.0.16-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-deduplicate-request |
1.0.2-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/hmac-upstream-signature |
1.2.29-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-jwt-auth |
1.5.7-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-opentelemetry |
1.3.63-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-prometheus |
1.3.51-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-runtime |
1.10.0-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitch |
9.4.27-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitching-directives |
3.1.37-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-common |
0.7.36-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http |
0.6.44-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http-callback |
0.6.3-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-ws |
1.0.11-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/wrap |
10.1.3-alpha-b7f095a0294699ce0720ea90d4530885a3f73921 |
npm ↗︎ unpkg ↗︎ |
🚀 Snapshot Release (Bun Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
🚀 Snapshot Release (Node Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait for the user to test and merge then.
Fixes ardatan/graphql-mesh#8691