GraphQL 页面插件
GraphQL Pages Plugin 可创建一个 GraphQL 服务器,用于响应 application/json
和 application/graphql
POST
请求。它使用
the GraphQL Playground响应GET
请求。
安装
使用方法
该插件只公开一条路由,因此安装在哪里,它就在哪里可用。在上例中,由于它被挂载在 functions/graphql.ts
中,服务器将在 Pages 项目的 /graphql
中可用。