如何在 Graphql.js 中使用 GraphQL 订阅 [英] How to use subscription of GraphQL in Graphql.js

查看:33
本文介绍了如何在 Graphql.js 中使用 GraphQL 订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 relay-fullstack.它使用 GraphQL.js.我想在 GraphQL.js 中使用 GraphQL 订阅.但是我在 GraphQL.js 中找不到关于订阅 GraphQL 的文档.
我可以在 GraphQL.js 中使用 GraphQL 订阅吗?
或者它不支持?

I am using 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.
Can I use subscription of GraphQL in GraphQL.js?
Or does not it support that?

推荐答案

是的,你可以!我创建了一个基于 Facebook 中继示例的简单存储库,支持现代订阅(服务器和客户端),您可以查看它,我将来也可能会改进它:https://github.com/jeremy-colin/relay-examples-subscription

Yes you can! I created a simple repository based on Facebook relay-examples todo relay modern with subscriptions support (server and client), you can check it out, I might also improve it in the future: https://github.com/jeremy-colin/relay-examples-subscription

这篇关于如何在 Graphql.js 中使用 GraphQL 订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆