Skip to main content

Federation

Query Planning

Router analyzes incoming queries and creates an execution plan:

  1. Parse Query: break down the query into field selections
  2. Identify Entities: determine which entities need to be resolved
  3. Plan Execution: create optimal execution order
  4. Execute Subqueries: send requests to appropriate subgraphs
  5. Compose Response: merge responses into final result

Query Execution

Based on the query execution plan generated by the router, the query could be executed sequentially or in parallel across multiple subgraphs. The router orchestrates the execution, ensuring that dependencies are resolved correctly.