Cloudflare 中文文档
Pages
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

GraphQL 页面插件

GraphQL Pages Plugin 可创建一个 GraphQL 服务器,用于响应 application/jsonapplication/graphql POST 请求。它使用 the GraphQL Playground响应GET请求。

​​ 安装

​​ 使用方法

该插件只公开一条路由,因此安装在哪里,它就在哪里可用。在上例中,由于它被挂载在 functions/graphql.ts 中,服务器将在 Pages 项目的 /graphql 中可用。