Here's the codesandbox link: https://codesandbox.io/p/devbox/elastic-wind-jj3wrd
Don't forget to click the Open Preview button:

Steps to follow:
- Open the
/graphiql route relative to whatever url is assigned to your running fastify server in the codesandbox.
- Open the mutation and subscription operations in seperate browser tabs making sure both are in screen focus(limitation of graphiql web client where it drops the subscriptions when the subscription tab is not in focus)
- Execute the subscription operation.
- Execute the mutation operation.
- Notice the subscription operation, it has been disconnected after the very first mutation event was emitted.
The subscription works normally when tested with altair chrome extension: https://chromewebstore.google.com/detail/altair-graphql-client/flnheeellpciglgpaodhkhmapeljopja?pli=1
Here's the codesandbox link: https://codesandbox.io/p/devbox/elastic-wind-jj3wrd
Don't forget to click the

Open Previewbutton:Steps to follow:
/graphiqlroute relative to whatever url is assigned to your running fastify server in the codesandbox.The subscription works normally when tested with altair chrome extension: https://chromewebstore.google.com/detail/altair-graphql-client/flnheeellpciglgpaodhkhmapeljopja?pli=1