0

List 101 Users with GraphQL

Why I can not get all users at once while using PostGQL?

It just returns first 100 users while using GraphQL but works fine with a GET request.

GraphQL Query

get users

    {
      users(limit: 101, sort: "username") {
        id
        username
      }
    }

Result

result

Using Get Method returns full set!

I can get the full data set by GET /users?_limit=-1 if I use GET

NOTE: using limit: -1 does not work either.

{
  users(limit: -1) {
    id
    username
  }
}

  • Strapi Version:3.4.1
  • Operating System: Windows, Ubuntu
  • Database: Mysql, PostgreSQL
  • Node Version: 14.15.3
  • NPM Version: 6.14.9
  • Yarn Version: 1.22.5

1 Answer 1

1

The default amountLimit for the GraphQL plugin is 100. You can change this limit as stated here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.