You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: