The Subscription component uses scoped slots to provide the subscription state to the slot template.


The Subscription component is renderless by default, meaning it will not render any extra HTML other than its slot.


The Subscription component accepts the following props:

querystring or DocumentNodeYesThe subscription to be executed/started
variablesobjectNoThe subscription variables
pausedbooleanNoActivates/Deactivates the subscription, defaults to false
reduce(prev: any, current: ) => any or DocumentNodeNoA reducer used to aggregate the values returned by the subscription, check the subscription guide for more information

Slot Props

The Mutation component exposes a single default slot with the following properties:

dataany/nullThe GraphQL query result's data
errorCombinedErrorAny errors encountered during query execution
isDonebooleanSet to true when the query is executed at least once, never resets to false
isFetchingbooleanSet to true when the query is executing either by calling execute explicitly or by watch effect due to reactive variables or queries
isPausedbooleanIf the subscription is currently paused or inactive


The Mutation component does not emit any events at the moment