Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to query the name of a user.
GraphQL
{ user { [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a field that does not exist in the user type.
Forgetting to specify a field inside the user braces.
✗ Incorrect
The name field is requested to get the user's name.
2fill in blank
mediumComplete the code to query the user's email.
GraphQL
{ user { [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a field that is not part of the user type.
Using a sensitive field like password which is usually not queryable.
✗ Incorrect
The email field is requested to get the user's email address.
3fill in blank
hardFix the error in the query to get the user's id.
GraphQL
{ user { [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase or camel case for field names incorrectly.
Using a field name that does not exist.
✗ Incorrect
The field id is case-sensitive and must be lowercase.
4fill in blank
hardFill both blanks to query user's name and email.
GraphQL
{ user { [1] [2] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including fields that are not part of the user type.
Forgetting to separate fields with space.
✗ Incorrect
To get both name and email, include both fields inside the user braces.
5fill in blank
hardFill all three blanks to query user's id, name, and email.
GraphQL
{ user { [1] [2] [3] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including sensitive or invalid fields like password.
Using incorrect field names or casing.
✗ Incorrect
Query the id, name, and email fields inside the user braces to get all three.