Q39: How does the GraphQL Engine process a query from string to JSON response?
Execution occurs in 4 distinct phases:
- Parsing: Converts raw query string into an Abstract Syntax Tree (AST).
- Validation: Verifies AST against schema rules (type safety, depth limits, directive rules).
- Execution: Traverses AST nodes, invoking resolver functions in execution trees.
- Formatting: Formats errors/data into the standardized JSON structure.
Key Takeaways
- GraphQL request processing order: Parsing $\rightarrow$ Validation $\rightarrow$ Execution $\rightarrow$ Formatting.
Knowledge Check
What structure is produced during the initial Parsing phase of a query?