0
0
GraphQLquery~10 mins

Field selection in GraphQL - Interactive Code Practice

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

Complete the code to select the user's name field.

GraphQL
{ user { [1] } }
Drag options to blanks, or click blank then click option'
Aage
Bemail
Cname
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting a field that does not exist like 'username'.
Using a field unrelated to the user's name.
2fill in blank
medium

Complete the code to select the user's email field.

GraphQL
{ user { [1] } }
Drag options to blanks, or click blank then click option'
Aphone
Bemail
Cid
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting 'phone' instead of 'email'.
Using 'username' which is not defined.
3fill in blank
hard

Fix the error in the query to select the user's id field.

GraphQL
{ user { [1] } }
Drag options to blanks, or click blank then click option'
Aid
Bname
Cemail
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ID' with uppercase letters which is case sensitive.
Selecting 'age' instead of 'id'.
4fill in blank
hard

Fill both blanks to select the user's name and email fields.

GraphQL
{ user { [1] [2] } }
Drag options to blanks, or click blank then click option'
Aname
Bemail
Cid
Dphone
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting 'id' or 'phone' instead of 'email'.
Using incorrect field names or misspellings.
5fill in blank
hard

Fill all three blanks to select the user's id, name, and email fields.

GraphQL
{ user { [1] [2] [3] } }
Drag options to blanks, or click blank then click option'
Aid
Bname
Cemail
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'age' instead of 'email'.
Misspelling any of the field names.