Examples

GraphQl Yoga SSE subscriptions Example

Check the example

Configuration

1
2
3
4
5
const counter = introspect.graphql({
apiNamespace: 'counter',
url: 'http://127.0.0.1:4000/graphql',
subscriptionsUseSSE: true,
})

Getting started

1
npm install && npm start

Check results

1
curl -N http://localhost:9991/operations/Counter

SSE output

1
curl -N http://localhost:9991/operations/Counter\?wg_sse\=true

Was this article helpful to you?
Provide feedback

Edit this page