【发布时间】:2022-01-18 17:23:26
【问题描述】:
我将 React 与 Strapi 和 GrapqQL 一起使用,以便从 Strapi 检索我的数据。
似乎我的查询最多只能检索 10 个项目。这个新版本更改了 API,我不允许在查询中使用 first:100。
此链接1 已过时。我不知道这是来自 Strapi 还是 GraphQL 新版本的策略。 1https://graphql.org/learn/pagination/
const REVIEWS = gql`
query GetReviews {
reviews (sort: "createdAt:desc") {
data{
id
attributes{
title
rating
body
createdAt
categories{
data{
id
attributes
{
name
}
}
}
}
}
}
}
`
【问题讨论】: