问题
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