GraphQL API
Page summary:GraphQL API 允许对内容类型进行查询和修改,并支持过滤、排序和分页。它使用
documentId作为唯一标识符,并提供单数和复数查询,支持关系、媒体字段、组件、动态区域和本地化。🌐 The GraphQL API allows querying and mutating content-types with filtering, sorting, and pagination. It uses
documentIdas the unique identifier and provides singular and plural queries with support for relations, media fields, components, dynamic zones, and localization.
GraphQL API 允许通过 Strapi 的 GraphQL 插件 对 内容类型 执行查询和变更。结果可以被 过滤、排序 和 分页。
🌐 The GraphQL API allows performing queries and mutations to interact with the content-types through Strapi's GraphQL plugin. Results can be filtered, sorted and paginated.
要使用 GraphQL API,请安装 GraphQL 插件:
🌐 To use the GraphQL API, install the GraphQL plugin:
- Yarn
- NPM
yarn add @strapi/plugin-graphql
npm install @strapi/plugin-graphql
安装完成后,GraphQL playground 可通过 /graphql URL 访问,并可用于交互式构建查询和变更操作,以及阅读针对你的内容类型定制的文档:
🌐 Once installed, the GraphQL playground is accessible at the /graphql URL and can be used to interactively build your queries and mutations and read documentation tailored to your content-types:
