Skip to content

Single Record Query

You can fetch a single record using queries. In the following examples, we have a table called students, which contains fields and relations like firstName, email.

You can fetch a single record using the record’s id.

Request

query MyQuery1 {
studentsById(id: "e25c4955-7ea7-4a83-a3de-d4c7427cc9fa") {
id
firstName
email
}
}

Response

{
"data": {
"studentsById": {
"id": "e25c4955-7ea7-4a83-a3de-d4c7427cc9fa",
"firstName": "Robert",
"email": "robert.williams@example.com"
}
}
}