现有的公共面向GraphQl服务可以与GraphQl联合会共存
我目前正在拥有某些客户消费的非联合GraphQl服务,现在有一个新的要求,我需要将现有的非联合GraphQl服务转换为Federated。所以我的问题是,我可以有两个与联邦运行的Apollo服务器的插入,另一台与非联邦运行?我不想为联邦保留两套不同的存储库,而另一个用于非联邦。另外,我现有的客户不能很快进入联邦服务
I am currently having a non federated graphql service which is consumed by certain clients, now there is a new requirement where I need to convert my existing non federated graphql service to federated. So my question is can I have two intstance of apollo server running one with federation and another with non federation? I don’t want to maintain two different set of repositories one for federation and another for non federation. Also my existing clients can’t move into federated services anytime soon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定是否可以在Apollo服务器中进行,但是GraphQl Yoga可以有条件地使用架构: https://the-guild.dev/graphql/yoga-server/docs/docs/features/schema#conditional-schema
您可以共享
/GraphQl Federeated和Federerated和Federerated和Federerated和Federerated and Code>取决于HTTP标头(或HTTP请求的任何属性)或具有服务不同模式的两个端点的非填充模式。
Not sure if it's possible in Apollo Server, but GraphQL Yoga can serve schema conditionally: https://the-guild.dev/graphql/yoga-server/docs/features/schema#conditional-schema
You could share
/graphql
endpoint for federated and non-federated schema that depends on an http header (or any property of the http request) or have two endpoints serving different schemas.