strapi graphql 仅限制 return 100 个项目,即使我将限制设置为 -1
strapi graphql limit only return 100 items even if I set limit to -1
目前我在使用 strapi graphql 查询时遇到了一些问题。我最多只能查询100条左右
这是我的查询:
query StudioList { studios(limit: -1) { id slug name } }
有或没有限制总是 return 100 件。我如何查询超过 100 个?
谢谢..
我找到了解决方案:
如果您的 strapi ./config 文件夹中有 plugins.js 文件,则添加以下代码:
module.exports = {
//
graphql: {
endpoint: '/graphql',
shadowCRUD: true,
playgroundAlways: false,
depthLimit: 7,
amountLimit: 2500,
apolloServer: {
tracing: false,
},
},
};
将金额限制更改为您想要的任何值..
然后重新启动服务器,现在它应该显示超过 100 个项目。
我尝试使用 strap 3.6.8 版本,但这不起作用。我重建 strapi "npm build" & "yarn develop"
module.exports = {
//
graphql: {
endpoint: '/graphql',
shadowCRUD: true,
playgroundAlways: false,
depthLimit: 7,
amountLimit: 2500,
apolloServer: {
tracing: false,
},
},
};
目前我在使用 strapi graphql 查询时遇到了一些问题。我最多只能查询100条左右
这是我的查询:
query StudioList { studios(limit: -1) { id slug name } }
有或没有限制总是 return 100 件。我如何查询超过 100 个? 谢谢..
我找到了解决方案: 如果您的 strapi ./config 文件夹中有 plugins.js 文件,则添加以下代码:
module.exports = {
//
graphql: {
endpoint: '/graphql',
shadowCRUD: true,
playgroundAlways: false,
depthLimit: 7,
amountLimit: 2500,
apolloServer: {
tracing: false,
},
},
};
将金额限制更改为您想要的任何值.. 然后重新启动服务器,现在它应该显示超过 100 个项目。
我尝试使用 strap 3.6.8 版本,但这不起作用。我重建 strapi "npm build" & "yarn develop"
module.exports = {
//
graphql: {
endpoint: '/graphql',
shadowCRUD: true,
playgroundAlways: false,
depthLimit: 7,
amountLimit: 2500,
apolloServer: {
tracing: false,
},
},
};