Content Deep Dive
How to Use Subscriptions in GraphiQL
Blog post from Apollo
Post Details
Company
Date Published
Author
Uri Goldshtein
Word Count
606
Company Posts That Month
Language
English
Hacker News Points
-
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.
Trends Found in this Post
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Real-time | 1 | 218 | 62 | 33 | -26% |
| Serverless | 1 | 134 | 18 | 12 | -27% |