简体   繁体   English

如何使用 Apollo graphql 和 Strapi 获取超过 100 个项目的限制?

[英]How to fetch more than 100 items limit with Apollo graphql and strapi?

Strapi (my api) fixed a limit of 100 fetch items. Strapi(我的 api)修复了 100 个获取项目的限制。 My question is how to fetch more than the 100 limit items in strapi.我的问题是如何在trapi中获取超过100个限制项。 I made my request with Apollo graphql.我向 Apollo graphql 提出了我的请求。

I started to use parameters in my graphql request.我开始在我的 graphql 请求中使用参数。 But it limited the number only on the limit of the api.但它仅在 api 的限制上限制了数量。 So, I can fetch only 20 items for example, but not 110 items for example.因此,例如,我只能获取 20 个项目,但不能获取 110 个项目。

I imagine it's possible to pass parameter in the api call, but I don't know how to.我想可以在 api 调用中传递参数,但我不知道如何。

I stock my api url here.我在这里存放我的 api 网址。

Here I use Apollo to dispatch my api.这里我使用 Apollo 来调度我的 api。

Thank you in advance!先感谢您!

You can use the _limit parameter to control the limit of items you want to fetch您可以使用_limit参数来控制要获取的项目的限制

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

You can read more on strapi docs你可以阅读更多关于Strapi docs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM