Export client
and subscribeToMore
from useSuspenseQuery
#10429
Description
As explained in the PR, my initial goal with the API surface area of useSuspenseQuery
was to keep it small and add to it as we have feedback throughout the alpha release process.
While working with useSuspenseQuery
in the Spotify demo, I have added a subscription to be able to listen for the playback state to change. Because I'm fetching the initial data set with useSuspenseQuery
, I want to be able to use subscribeToMore
to start the subscription and easily update the cache with the results from the subscription.
As a workaround, I tried to write to the cache directly in combination with useSubscription
, but the client
property isn't exported from useSuspenseQuery
, making this a touch more difficult. This is a property exported by useQuery
, so it would make sense that useSuspenseQuery
would do the same. This makes it easier to get access to the client to perform manual cache updates when needed.