GraphqlSubscriptionResult<T>: Observable<GraphqlSubscriptionMessage<T>>

The return value from a graphql({query}) call when query is a subscription.

//               |-- You are here
// v
const subResult: GraphqlSubscriptionResult<T> = client.graphql({
query: onCreateWidget
});

const sub = subResult.subscribe({
//
// |-- You are here
// v
next(message: GraphqlSubscriptionMessage<OnCreateWidgetSubscription>) {
handle(message.value); // <-- type OnCreateWidgetSubscription
}
})

Type Parameters

  • T