0
0
Postmantesting~10 mins

GraphQL body in Postman - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the GraphQL query body with the correct key.

Postman
{
  "[1]": "{ user(id: \"1\") { name } }"
}
Drag options to blanks, or click blank then click option'
Aheaders
Bmutation
Cvariables
Dquery
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mutation' instead of 'query' for a query operation.
Using 'variables' as the main key instead of 'query'.
2fill in blank
medium

Complete the code to include variables in the GraphQL body correctly.

Postman
{
  "query": "query getUser($id: ID!) { user(id: $id) { name } }",
  "[1]": { "id": "1" }
}
Drag options to blanks, or click blank then click option'
Aheaders
Bvariables
CoperationName
Dbody
Attempts:
3 left
💡 Hint
Common Mistakes
Putting variables inside the 'query' string instead of the 'variables' key.
Using 'headers' or 'body' keys incorrectly.
3fill in blank
hard

Fix the error in the GraphQL body by selecting the correct key for the operation name.

Postman
{
  "query": "query getUser { user { name } }",
  "[1]": "getUser"
}
Drag options to blanks, or click blank then click option'
AoperationName
Bvariables
CqueryName
Doperation
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'queryName' or 'operation' which are not valid keys.
Confusing 'variables' with the operation name.
4fill in blank
hard

Fill both blanks to create a valid GraphQL mutation body with variables.

Postman
{
  "[1]": "mutation addUser($name: String!) { addUser(name: $name) { id } }",
  "[2]": { "name": "Alice" }
}
Drag options to blanks, or click blank then click option'
Aquery
Bvariables
Cmutation
DoperationName
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'query' key for mutations.
Putting variables inside the mutation string.
5fill in blank
hard

Fill all three blanks to build a complete GraphQL request body with query, variables, and operation name.

Postman
{
  "[1]": "query getUser($id: ID!) { user(id: $id) { name } }",
  "[2]": { "id": "2" },
  "[3]": "getUser"
}
Drag options to blanks, or click blank then click option'
Aquery
Bvariables
CoperationName
Dbody
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up keys or omitting the operationName when needed.
Putting variables inside the query string.