Company
Date Published
Author
Uri Goldshtein
Word count
606
Language
English
Hacker News points
None

Summary

The GraphiQL library already supports subscriptions, allowing users to configure their own transport and enabling live-stream subscriptions into the app's GraphiQL editor. To use this feature, developers need to add a new field called `subscriptionsEndpoint` to the `graphiqlExpress` config with the Websocket URL of the subscriptions endpoint. This allows users to write GraphQL subscriptions queries in GraphiQL, which will be pushed into the client and displayed in real-time, using a plug-and-play solution provided by the `graphql-subscriptions-fetcher`. The feature is available for use with various server frameworks such as Express, Hapi, Koa, Restify, and Lambda.