【问题标题】:How to fetch more than 100 items limit with Apollo graphql and strapi?如何使用 Apollo graphql 和strapi 获取超过 100 个项目限制?
【发布时间】:2021-02-04 08:55:31
【问题描述】:

Strapi(我的 api)修复了 100 个获取项目的限制。我的问题是如何在strapi 中获取超过 100 个限制项目。我向 Apollo graphql 提出了我的要求。

I started to use parameters in my graphql request. But it limited the number only on the limit of the api. So, I can fetch only 20 items for example, but not 110 items for example.

我想可以在 api 调用中传递参数,但我不知道如何。

I stock my api url here.

Here I use Apollo to dispatch my api.

提前谢谢你!

【问题讨论】:

  • 欢迎您!请编辑您的问题以包含格式正确的代码和代码图像。这个meta post 列举了许多为什么这非常重要的原因。此外,正如所写的那样,很难了解您的完整问题,因为它需要点击问题每个部分的图像。

标签: react-native graphql apollo fetch-api strapi


【解决方案1】:

您可以使用_limit 参数来控制要获取的项目的限制

_limit=300 //limits to 300 results
_limit=-1 //gets all results

您可以在 strapi docs阅读更多内容

【讨论】:

    猜你喜欢
    • 2021-12-12
    • 1970-01-01
    • 2020-01-30
    • 1970-01-01
    • 1970-01-01
    • 2020-09-11
    • 2021-05-18
    • 2018-06-04
    • 2018-04-20
    相关资源
    最近更新 更多