feat: add SubscriptionOnStartHandler#2059
Merged
dkorittki merged 140 commits intotopic/streams-v1from Oct 10, 2025
Merged
Conversation
…fields only where needed
…subscription and not going to other client that subscribed the same subscription
dkorittki
approved these changes
Oct 10, 2025
5 tasks
This was referenced Oct 29, 2025
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores
Depends on engine PR: wundergraph/graphql-go-tools#1243
How to use the new hook?
The hook implemented in this PR is the
SubscriptionOnStartHandleras defined here:cosmo/router/core/subscriptions_modules.go
Line 107 in ceac255
Example
Query
On the demo graph, we will create a module that add some logic to the following query
Module code that implement the new hook
As an example, this module will emit a message if the subscription is started with employeeID == 1.
Checklist