Bird
0
0

Find the mistake in this GraphQL query:

medium📝 Debug Q7 of 15
GraphQL - Queries
Find the mistake in this GraphQL query:
{ user { id profile { email phone } }
AField names must be uppercase
BMissing closing brace for the user field
CCannot nest fields inside profile
DMissing commas between fields
Step-by-Step Solution
Solution:
  1. Step 1: Check for balanced braces

    The query opens braces for user and profile but closes only one, missing a closing brace for user.
  2. Step 2: Verify other syntax rules

    Field names can be lowercase, nesting is allowed, and commas are not used between fields.
  3. Final Answer:

    Missing closing brace for the user field -> Option B
  4. Quick Check:

    Braces must be balanced in GraphQL queries [OK]
Quick Trick: Always close all opened braces [OK]
Common Mistakes:
  • Forgetting closing braces
  • Thinking commas are required
  • Believing field names must be uppercase

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes