Skip to content

Feedback for “Subscriptions” #1975

@boomdizz

Description

@boomdizz

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.

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