ApolloSubscription ​
Props ​
| Name | Type | Default | Description |
|---|---|---|---|
subscription (required) | TypedDocumentNode<TData, TVariables> | Â | The subscription document. |
variables | TVariables | undefined | Â | Variables for the subscription. |
disabled | boolean | undefined | false | Stop the subscription. |
clientId | string | undefined | Â | Name of the client to use, from the provided ApolloClients map. |
options | useSubscription.Options<TData, TVariables> | undefined | Â | Escape hatch for any other useSubscription option. |
Events ​
| Name | Payload |
|---|---|
result | [data: TData] |
error | [error: ErrorLike] |
complete | [] |
Slots ​
#default ​
| Slot prop | Type |
|---|---|
result | TData | undefined |
loading | boolean |
error | ErrorLike | undefined |
start | () => void |
stop | () => void |
restart | () => Promise<void> |
Exposed ​
A template ref receives the full useSubscription.Result surface, with refs unwrapped.
vue
<template>
<ApolloSubscription ref="apollo" ... />
</template>