61bd1dbc918f12c17b9c6483.
Variables
Go to the variables section and define the variable.Using the variable in the query
Now create a querygetCharacter with variables as shown below:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Learn how to use variables in a GraphQL query.
61bd1dbc918f12c17b9c6483.
{
"id": "61bd1dbc918f12c17b9c6483"
}
getCharacter with variables as shown below:
query getCharacter($id:String!){
character(id:$id) {
name
avatarSrc
rank
description
village
}
}
{
"data": {
"character": {
"name": "Aburame Shibi",
"avatarSrc": "https://narutoql.s3.amazonaws.com/Aburame2.jpg",
"rank": "Jounin",
"description": "Aburame Shibi is the father of Aburame Shino. Like his son, his body is also inhabited by the destruction bugs.",
"village": "leaf village"
}
}
}
Was this page helpful?