Skip to content

the inbuilt mercurius graphiql web client drops the subscription after the first event #1116

Description

@adrtivv

Here's the codesandbox link: https://codesandbox.io/p/devbox/elastic-wind-jj3wrd

Don't forget to click the Open Preview button:
1

Steps to follow:

  1. Open the /graphiql route relative to whatever url is assigned to your running fastify server in the codesandbox.
  2. 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)
  3. Execute the subscription operation.
  4. Execute the mutation operation.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions