当我使用Apollo服务器与GraphQl使用Apollo服务器时,为什么需要Express?

发布于 2025-01-27 03:23:38 字数 224 浏览 2 评论 0原文

我试图使用Apollo Server/GraphQl和Postgres构建服务器,但是找不到任何不使用Express的示例。因此,它是有理由需要它的。

因此,从我的理解中,GraphQl使用一个端点,因为您使用已发送的GQL查询和解析器指定了想要的内容,这似乎使Express不必要。这让我很好奇,为什么似乎需要表达?如果您不需要多个端点,那么这似乎使Express端点多余?我只是一个初学者,但是我对它的理解是否缺少?

I was trying to build a server with Apollo Server/GraphQL and Postgres, but I can't find any examples that don't use Express. Therefore, it stands to reason that you need it.

So from my understanding, GraphQL uses a single endpoint because you specify what you want with the sent GQL query and resolver, and that seems to make Express unnecessary. It makes me curious, why does Express seem to be needed? If you don't need multiple endpoints, then that seems to make Express endpoints superfluous? I'm only a beginner, but is there something I'm missing in my understanding of it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

非要怀念 2025-02-03 03:23:38

只有Apollo服务器才能构建服务器不需要Express 示例。我认为以下是每个人都使用express 阅读更多<<<<< /a>

Only Apollo Server can build a server don't need Express example. I think below are reasons that everyone uses Express read more

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