In order to retrieve all registered users, we will use a query that requests all users without using any parameters, like so:
query Users {
User {
login
total_contributions
}
}
This can be tested in the GraphQL playground to check that it returns all the users in the Neo4j graph.
Here, we are using a very small dataset containing two to four users. If your dataset contains more, which is very likely, you may need to use pagination instead. Refer to the GRANDstack application starter to see an example of such a feature:
https://github.com/grand-stack/grand-stack-starter/blob/master/web-react/src/components/UserList.js.
https://github.com/grand-stack/grand-stack-starter/blob/master/web-react/src/components/UserList.js.