A GraphQL query requests data without changing it. You choose the fields you need, and one query can fetch selected details from multiple resources. Even when sent over HTTP POST, a query is a safe read: repeating it does not change the data. This differs from a mutation, which changes data. section 6.4.2
Listing 6.2 GraphQL Request/Response
# The Request (Your Shopping List)
query {
chipItem: product(id: "123") {
name # I only want the name for the chips
}
sodaItem: product(id: "456") {
price # I only want the price for the soda
}
}
# The Response
{
"data": {
"chipItem": { "name": “Salt & Vinegar” },
“sodaItem”: { “price”: 1.50 }
}
}See a request for the chip’s name and the soda’s price, and the response containing only those fields. section 6.4.2


