如何在 Graphql.js 中使用 GraphQL 订阅

How to use subscription of GraphQL in Graphql.js

我正在使用 relay-fullstack. It's using GraphQL.js. I want use subscription of GraphQL in GraphQL.js. But I can't find documents about subscription of GraphQL in GraphQL.js
我可以在 GraphQL.js 中使用 GraphQL 订阅吗?
还是不支持?

是的,你可以!我创建了一个基于 Facebook relay-examples todo relay modern with subscriptions support (server and client) 的简单存储库,你可以看看,我以后可能还会改进它:https://github.com/jeremy-colin/relay-examples-subscription