hasura / go-graphql-client

Package graphql provides a GraphQL client implementation.
MIT License
395 stars 91 forks source link

Get list/map of subscriptions #131

Closed andrexus closed 6 months ago

andrexus commented 6 months ago

I'm currently utilizing the GetSubscription(id string) method in the subscription client, which allows to retrieve a subscription by its ID. However, I'd like to propose a new feature that could enhance the functionality of the subscription client.

Could your consider adding a new method that returns a list or map of all subscriptions that have been registered by a client?

Use case: The motivation behind this request is to improve error handling. When an error occurs, the OnError callback is triggered. I want to engage all subscription handlers and pass along the error. As it stands, I need to manually track all subscriptions because the subscription client doesn't reveal the underlying subscriptions map.

This proposed feature could streamline the process and enhance the efficiency of error handling.

hgiasac commented 6 months ago

Make sense. I have exposed the method https://github.com/hasura/go-graphql-client/pull/132

andrexus commented 6 months ago

Many many thanks!!!