Bird
0
0

Identify the error in this mutation:

medium📝 Debug Q6 of 15
GraphQL - Mutations
Identify the error in this mutation:
mutation {
  createUser(name: "Bob" age: 30) {
    id
  }
}
ASelection set missing
BMutation keyword misspelled
CArguments should be inside quotes
DMissing comma between arguments
Step-by-Step Solution
Solution:
  1. Step 1: Check argument syntax

    Arguments must be separated by commas; here, name: "Bob" age: 30 lacks a comma.
  2. Step 2: Confirm other syntax parts

    Mutation keyword is correct, selection set exists, and argument values are properly quoted.
  3. Final Answer:

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

    Argument list syntax = comma separated [OK]
Quick Trick: Separate arguments with commas inside parentheses [OK]
Common Mistakes:
  • Omitting commas between arguments
  • Misspelling mutation keyword
  • Forgetting selection set braces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes