Per effettuare delle richieste GraphQL ci basta sapere come è strutturata l’api e poi utilizzare la seguente sintassi:
{
"query": "{ <nome tabella> { <colonna1> <colonna2> <ecc> } }"
}Per esempio se volessi ottenere informazioni sulla tabella Post di questa struttura:

Ci basterebbe inviare questa query:
POST /graphql HTTP/1.1
Host: graphql.thm:8080
Content-Length: 46
Accept-Language: en-US,en;q=0.9
Accept: */*
Content-Type: application/json
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Origin: http://graphql.thm
Referer: http://graphql.thm/
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
{
"query": "{ posts { title content } }"
}Per ottenere i campi title e content della tabella posts