Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to request a field that might return an error.
GraphQL
query { user { name email [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a regular data field like 'age' or 'phone' instead of the error field.
✗ Incorrect
The error field is used to request field-level errors in GraphQL responses.
2fill in blank
mediumComplete the code to handle errors for a nested field.
GraphQL
query { product { id name reviews [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting a normal data field like 'rating' or 'comment' instead of the error field.
✗ Incorrect
The error field inside reviews helps capture errors related to reviews.
3fill in blank
hardFix the error in the query to correctly request field-level errors.
GraphQL
query { order { id total [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural or underscored versions like 'errors' or 'error_code' which are not standard.
✗ Incorrect
The standard field to request field-level errors is error.
4fill in blank
hardFill both blanks to request a field and its error message.
GraphQL
query { user { [1] [2] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing two data fields instead of including the error field.
✗ Incorrect
Request the email field and the error field to get its error message.
5fill in blank
hardFill all three blanks to request a nested field, its error, and the error message.
GraphQL
query { post { comments { [1] [2] { [3] } } } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not nesting the message inside the error field.
✗ Incorrect
Request the text field, the error field, and inside error the message to get detailed error info.