0
0
GraphQLquery~10 mins

Why queries request specific data in GraphQL - Test Your Understanding

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

Complete the code to request the user's name in a GraphQL query.

GraphQL
query { user { [1] } }
Drag options to blanks, or click blank then click option'
Aaddress
Bage
Cname
Demail
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a field that does not exist or is unrelated to the user's name.
2fill in blank
medium

Complete the code to request the user's email in a GraphQL query.

GraphQL
query { user { [1] } }
Drag options to blanks, or click blank then click option'
Aemail
Bphone
Cusername
Dlocation
Attempts:
3 left
💡 Hint
Common Mistakes
Requesting unrelated fields like phone or location instead of email.
3fill in blank
hard

Fix the error in the query to request the user's age correctly.

GraphQL
query { user { [1] } }
Drag options to blanks, or click blank then click option'
Aage
Bages
CuserAge
Dbirthday
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural or incorrect field names like ages or userAge.
4fill in blank
hard

Fill both blanks to request the user's name and email in the query.

GraphQL
query { user { [1] [2] } }
Drag options to blanks, or click blank then click option'
Aname
Bemail
Cage
Dlocation
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing unrelated fields like age or location.
5fill in blank
hard

Fill all three blanks to request the user's name, email, and age in the query.

GraphQL
query { user { [1] [2] [3] } }
Drag options to blanks, or click blank then click option'
Aname
Bemail
Cage
Daddress
Attempts:
3 left
💡 Hint
Common Mistakes
Including unrelated fields like address.