Skip to content
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

Feedback for “Subscriptions” #1975

Open
boomdizz opened this issue Mar 23, 2023 · 0 comments
Open

Feedback for “Subscriptions” #1975

boomdizz opened this issue Mar 23, 2023 · 0 comments

Comments

@boomdizz
Copy link

Since Subscriptions are long-lived operations (compared to Queries and Mutations), we need a means to terminate the subscription.
A usecase we have is to show monitoring data for a bunch of hosts we manage. We have a webpage where the user selects a host from a drop down list (or select list) and we get it's monitoring data from the backend, display it and then use subscribeToMore to fetch new data as it becomes available on the backend. But if the user uses the drop-down for another host, we want to start the subscription for data on the new host. At this point we want to 'unsubscribe' for the old host, otherwise the backend will unnecessarily be consuming resources to send data to the client which will not be shown in the UI. It is best to have an option to unsubscribe as it conserves resources on the client and server end.
Maybe there is a way of doing this, but I could not find it in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant