use_subscription library

Functions

useSubscription(SubscriptionOptions subscriptionOptions, {GraphQLClient client}) OperationResult<Map<String, dynamic>>
This hook is very similar to the useQuery but don't expose a refetch function, since it's nature is the one of a Stream. It will subscribe to the given subscription and unsubscribe thanks to the internal usage of useStream.