strapi graphql limit only return 100 items even if I set limit to -1

让人想犯罪 __ 提交于 2020-12-13 04:55:08

问题


currently I have some problem with strapi graphql query. I can only query about 100 items max.

here is my query: query StudioList { studios(limit: -1) { id slug name } }

with or without limit always return 100 items. how do i query for more than 100? thanks..


回答1:


I found the solution: if you have plugins.js file in your strapi ./config folder, then add the following code:

module.exports = {
  //
  graphql: {
    endpoint: '/graphql',
    shadowCRUD: true,
    playgroundAlways: false,
    depthLimit: 7,
    amountLimit: 2500,
    apolloServer: {
      tracing: false,
    },
  },
};

change the amountlimit to whatever you want.. then restart the server, now it should shows more than 100 items.



来源:https://stackoverflow.com/questions/64467307/strapi-graphql-limit-only-return-100-items-even-if-i-set-limit-to-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!