Great! At this point, you're very close to executing your first GraphQL query and mutation. The first query we will execute is going to be getUsers. The following is the correct syntax for running a query:
query {
getUsers {
id
username
privilege
}
}
When you don't have any attribute to pass to the query, you just need to specify the name of the query under the query {...} block and then specify the fields you want to retrieve once you've executed your query. In this case, we want to fetch the id, username, email, and privilege fields.
If you run this query, you will probably get an empty array of data. This is because we don't have any users registered yet:
This means we need to execute our createUser mutation in order to register our first user. One thing I like about GraphQL Playground is that you have all the schema documentation in the DOCS tab on the right-hand side. If you click on the DOCS tab, you...