0
0
GraphQLquery~10 mins

Why advanced features improve flexibility 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 query the name of a user.

GraphQL
query { user(id: 1) { [1] } }
Drag options to blanks, or click blank then click option'
Aname
Bage
Cemail
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a field that does not represent the user's name.
Leaving the field blank.
2fill in blank
medium

Complete the code to fetch the user's email address.

GraphQL
query { user(id: 2) { [1] } }
Drag options to blanks, or click blank then click option'
Aemail
Bage
Cname
Daddress
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting a field unrelated to email.
Confusing 'email' with 'address'.
3fill in blank
hard

Fix the error in the query to get the user's age.

GraphQL
query { user(id: 3) { [1] } }
Drag options to blanks, or click blank then click option'
Aphone
Bemail
Cname
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using a field that does not exist or is unrelated to age.
Misspelling the field name.
4fill in blank
hard

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

GraphQL
query { user(id: 4) { [1] [2] } }
Drag options to blanks, or click blank then click option'
Aname
Bemail
Cage
Daddress
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting fields unrelated to name or email.
Using the same field twice.
5fill in blank
hard

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

GraphQL
query { user(id: 5) { [1] [2] [3] } }
Drag options to blanks, or click blank then click option'
Aaddress
Bemail
Cage
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Including unrelated fields like address.
Missing one of the required fields.