现有的公共面向GraphQl服务可以与GraphQl联合会共存

发布于 2025-02-08 07:40:41 字数 165 浏览 1 评论 0原文

我目前正在拥有某些客户消费的非联合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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

懒的傷心 2025-02-15 07:40:41

不确定是否可以在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文