Skip to content

subscribe: replace perEventExecutor with mapSourceToResponseEvent#4729

Merged
yaacovCR merged 1 commit into
graphql:17.x.xfrom
yaacovCR:perEventExecutor
May 9, 2026
Merged

subscribe: replace perEventExecutor with mapSourceToResponseEvent#4729
yaacovCR merged 1 commit into
graphql:17.x.xfrom
yaacovCR:perEventExecutor

Conversation

@yaacovCR

@yaacovCR yaacovCR commented May 9, 2026

Copy link
Copy Markdown
Contributor

Remove the perEventExecutor execution arg and expose the subscription response-stream mapping step as mapSourceToResponseEvent.

Subscription customization now has a full pipeline of helpers:

validateSubscriptionArgs
createSourceEventStream
mapSourceToResponseEvent

Replacing subscribe with a custom executor was already theoretically possible by calling createSourceEventStream and writing the mapping helper yourself. By exporting the helper and removing perEventExecutor, there is now one supported way to customize subscribe: compose the subscription pipeline directly.

Having a single customization path reduces the documentation and maintenance surface.

perEventExecutor was only released on the v17 alpha line, so this is a breaking change from previous v17 pre-releases, but not a breaking change from v16.

Remove the perEventExecutor execution arg and expose the subscription response-stream mapping step as mapSourceToResponseEvent.

Subscription customization now has a full pipeline of helpers:

  validateSubscriptionArgs
  createSourceEventStream
  mapSourceToResponseEvent

Replacing subscribe with a custom executor was already theoretically possible by calling createSourceEventStream and writing the mapping helper yourself. By
exporting the helper and removing perEventExecutor, there is now one supported way to customize subscribe: compose the subscription pipeline directly.

Having a single customization path reduces the documentation and maintenance surface.

perEventExecutor was only released on the v17 alpha line, so this is not a breaking change from v16.
@yaacovCR yaacovCR added the PR: breaking change 💥 implementation requires increase of "major" version number label May 9, 2026
@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown

@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@yaacovCR yaacovCR merged commit 0cd2890 into graphql:17.x.x May 9, 2026
22 of 23 checks passed
yaacovCR added a commit that referenced this pull request May 10, 2026
## v17.0.0-beta.1 (2026-05-10)

#### Breaking Change 💥
* [#4729](#4729) subscribe: replace perEventExecutor with mapSourceToResponseEvent ([@yaacovCR](https://github.com/yaacovCR))
* [#4730](#4730) chore(engines): drop Node 20 support ([@yaacovCR](https://github.com/yaacovCR))
* [#4731](#4731) refactor(execution): extract buildResolveInfo helper ([@yaacovCR](https://github.com/yaacovCR))

#### New Feature 🚀
* [#4733](#4733) feat: support node v26 ([@yaacovCR](https://github.com/yaacovCR))

#### Bug Fix 🐞
* [#4725](#4725) chore: forward-port directives on directive definitions (#4521) ([@yaacovCR](https://github.com/yaacovCR))
* [#4727](#4727) chore: forward-port configuration of the `ofType` introspection depth (#4317) ([@yaacovCR](https://github.com/yaacovCR))

#### Polish 💅
* [#4728](#4728) polish: group FRAGMENT_VARIABLE_DEFINITION with executable defs ([@yaacovCR](https://github.com/yaacovCR))

#### Internal 🏠
<details>
<summary> 3 PRs were merged </summary>

* [#4460](#4460) internal: use node experimental-strip-types instead of ts-node ([@yaacovCR](https://github.com/yaacovCR))
* [#4732](#4732) internal: use node test instead of mocha + c8 ([@yaacovCR](https://github.com/yaacovCR))
* [#4734](#4734) internal: add comment re: rewriteRelativeImportExtensions ([@yaacovCR](https://github.com/yaacovCR))
</details>

#### Committers: 1
* Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
@yaacovCR yaacovCR deleted the perEventExecutor branch May 11, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: breaking change 💥 implementation requires increase of "major" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant