Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to query the name of all books.
GraphQL
query { books { [1] } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing
author instead of title.Using a field that does not exist in the schema.
✗ Incorrect
The title field gives the name of each book.
2fill in blank
mediumComplete the code to get the author's name for each book.
GraphQL
query { books { author { [1] } } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting
id instead of name.Choosing a field unrelated to the author's name.
✗ Incorrect
The name field inside author gives the author's name.
3fill in blank
hardFix the error in the query to get the book's title and the author's birth year.
GraphQL
query { books { title author { [1] } } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect casing like
birthyear.Using snake_case instead of camelCase.
✗ Incorrect
The correct field name is birthYear with camelCase.
4fill in blank
hardFill both blanks to query each book's title and the author's nationality.
GraphQL
query { books { [1] author { [2] } } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up
name and nationality.Using fields that don't exist in the schema.
✗ Incorrect
The book's title is title and the author's nationality is nationality.
5fill in blank
hardFill all three blanks to query the book's title, author's name, and author's birth year.
GraphQL
query { books { [1] author { [2] [3] } } } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to include all three fields.
Using incorrect field names or casing.
✗ Incorrect
The book's title is title, the author's name is name, and the birth year is birthYear.