如何在下一个 js 13.2.1 的新实验应用程序文件夹中使用@apollo/server 和@as-integrations/next

问题描述 投票:0回答:0

我在 app/api/graphql.ts 创建了一个文件。路由是/api/graphql。但是没有任何动作,只有404:This page could not be found

我试过这个指南https://github.com/apollo-server-integrations/apollo-server-integration-next。在此,Next.js API 路由将是 /api/graphql,通过在例如 pages/api/graphql.ts 处创建一个文件。

然后我想知道这个@as-integration/next 是否只适用于以前版本的NEXT JS。如何解决这个问题?

next.js graphql apollo-server
© www.soinside.com 2019 - 2024. All rights reserved.