Skip to content

Commit

Permalink
Update useSubscription options documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenn Creighton committed Mar 22, 2021
1 parent d7fe665 commit 1d7a7fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/shared/subscription-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
| `shouldResubscribe` | boolean | Determines if your subscription should be unsubscribed and subscribed again |
| `onSubscriptionData` | (options: OnSubscriptionDataOptions<TData>) => any | Allows the registration of a callback function, that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `subscriptionData`. |
| `fetchPolicy` | FetchPolicy | How you want your component to interact with the Apollo cache. For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy). |
| `context` | Record<string, any> | Shared context between your component and your network interface (Apollo Link). |
| `client` | ApolloClient | An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in. |

0 comments on commit 1d7a7fa

Please sign in to comment.