GraphQL is a strongly-typed query language and runtime for APIs that allows clients to specify the exact shape of the data they require.
GraphQL shifts control of data fetching from the server to the client.
Instead of the server defining fixed responses (as in REST), the client defines:
A GraphQL request is executed against a schema on the server:
query {
user {
id
name
}
}
Response
{
"data": {
"user": {
"id": "1",
"name": "Zeeshan"
}
}
}