Overview

GraphQL follows a layered architecture where a query from the client is executed against a schema, resolved through functions, and mapped to underlying data sources.


Core Components

  1. Client
  2. Schema
  3. Resolvers
  4. Execution Engine
  5. Data Sources

Request Flow

  1. Client sends query
  2. Server parses query → converts to AST
  3. Validates query against schema
  4. Execution engine calls resolvers
  5. Resolvers fetch data from sources
  6. Response is assembled and returned

Example Flow

Query