Bird
0
0

Identify the error in this mutation:

medium📝 Debug Q6 of 15
GraphQL - Mutations
Identify the error in this mutation:
mutation { updateUser(id: 5 name: "John") { id name } }
AMissing closing brace
BWrong keyword 'mutation'
CMissing comma between arguments
DInvalid field name 'updateUser'
Step-by-Step Solution
Solution:
  1. Step 1: Check argument syntax

    Arguments must be separated by commas; here, missing comma between id and name.
  2. Step 2: Verify other syntax parts

    Keyword and braces are correct; field name is valid.
  3. Final Answer:

    Missing comma between arguments -> Option C
  4. Quick Check:

    Arguments need commas [OK]
Quick Trick: Separate arguments with commas in mutations [OK]
Common Mistakes:
  • Omitting commas between arguments
  • Confusing mutation keyword
  • Missing braces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes