Aliases

We cannot do query or mutation for of the same name. For example, it's not possible to do the following:

query GetUserName {
	users(id: 123456) {
		username
	}
	
	users(id: 343456) {
		username
	}
}

To do something like this, we need to declare aliases:

query GetUserName {
	user1: users(id: 123456) {
		username
	}
	
	user2: users(id: 343456) {
		username
	}
}

And the answer will be

{
  "data": {
    "user1": {
      "name": "test1"
    },
    "user2": {
      "name": "test2"
    }
  }
}