Skip to content

Commit 73b0bb5

Browse files
ruggi99jerelmiller
andauthored
(docs) Add skip option to useSubscription hook (apollographql#10385)
* (docs) Add skip option to useSubscription hook * (docs) Add period to end of sentence for skip option. Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
1 parent 20996e8 commit 73b0bb5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

docs/shared/subscription-options.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| `subscription` | DocumentNode | A GraphQL subscription document parsed into an AST by `graphql-tag`. **Optional** for the `useSubscription` Hook since the subscription can be passed in as the first parameter to the Hook. **Required** for the `Subscription` component. |
44
| `variables` | { [key: string]: any } | An object containing all of the variables your subscription needs to execute |
55
| `shouldResubscribe` | boolean | Determines if your subscription should be unsubscribed and subscribed again |
6+
| `skip` | boolean | Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet. |
67
| `onSubscriptionData` | **Deprecated.** (options: OnSubscriptionDataOptions&lt;TData&gt;) => 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`. |
78
| `onData` | (options: OnDataOptions&lt;TData&gt;) => 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 `data`. |
89
| `onSubscriptionComplete` | **Deprecated.** () => void | Allows the registration of a callback function, that will be triggered when the `useSubscription` Hook / `Subscription` component completes the subscription. |

0 commit comments

Comments
 (0)