GraphQL API 已更新
🌐 The GraphQL API has been updated
在 Strapi 5 中,GraphQL API 已经更新。它可以处理新的扁平化响应格式(参见 相关重大变更),现在也可以接受 Relay-style 查询。
扁平查询仍然返回一个简单的文档数组。你也可以使用 Relay 风格的 *_connection 查询,它们返回 nodes 和一个 pageInfo 对象来处理分页。当你需要关于页面或总数的元数据时使用这些查询。
🌐 Flat queries still return a simple array of documents. You can also use Relay-style *_connection queries, which return nodes and a pageInfo object to handle pagination. Use these when you need metadata about pages or total counts.