In order to understand how query parameters work, let's consider another endpoint, organization. Through the GitHub API, let's say you send the following query:
{
organization(login) {
id
}
}
You will receive an error message in return:
"message": "Field 'organization' is missing required arguments: login"
This means the query has to be updated to the following:
{
organization(login: "neo4j") {
id
}
}
By requesting more fields, such as the creation date or the organization's website, the resulting data will be similar to the following:
{
"data": {
"organization": {
"name": "Neo4j",
"description": "",
"createdAt": "2010-02-10T15:22:20Z",
"url": "https://github.com/neo4j",
"websiteUrl": "http://neo4j.com/"
}
}
}
Much more complex queries can be...