0
0
GraphQLquery~10 mins

Performance testing 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 request the user name in a GraphQL query.

GraphQL
query { user { [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.
2fill in blank
medium

Complete the code to add a variable for user ID in the query.

GraphQL
query getUser($id: ID!) { user(id: [1]) { name } }
Drag options to blanks, or click blank then click option'
Aid
B$id
CuserId
Duser_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name without the dollar sign.
3fill in blank
hard

Fix the error in the query to correctly request posts with their titles.

GraphQL
query { posts { [1] } }
Drag options to blanks, or click blank then click option'
Atitles
Bpost_titles
CpostTitle
Dtitle
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural or incorrect field names.
4fill in blank
hard

Fill both blanks to request posts with title and author name.

GraphQL
query { posts { [1] author { [2] } } }
Drag options to blanks, or click blank then click option'
Atitle
Bname
Cid
Demail
Attempts:
3 left
💡 Hint
Common Mistakes
Requesting wrong fields like id or email instead.
5fill in blank
hard

Fill all three blanks to request comments with text, author name, and creation date.

GraphQL
query { comments { [1] author { [2] } [3] } }
Drag options to blanks, or click blank then click option'
Atext
Bname
CcreatedAt
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect field names or missing one of the required fields.