# API GraphQL Federation and Subgraph Schemas Status: public Confidence: medium (0.685) (verified) Last verified: 2026-06-03 Generation: ai_structured ## TL;DR GraphQL federation evidence helps agents reason about which subgraph owns a field, how entities are resolved, and whether a schema change will compose. ## Core Explanation Federated GraphQL splits one API graph across subgraphs. That gives teams ownership boundaries, but it also creates failure modes that do not appear in a single schema: entity keys, composition rules, router query planning, subgraph availability, and directive compatibility. Agents should inspect subgraph SDL, federation directives, entity keys, supergraph composition output, router version, schema checks, and field ownership before generating queries or recommending a schema migration. ## Source-Mapped Facts - Apollo Federation documentation says a Federation 2 subgraph must correctly resolve the Query._service enhanced introspection field. ([source](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/subgraph-spec)) - Apollo Federation documentation says a Federation 2 subgraph must provide a mechanism for resolving entity fields through Query._entities. ([source](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/subgraph-spec)) - Apollo Federation documentation says Federation 2 subgraph schemas opt in to federation features by applying the @link directive to the schema type. ([source](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/directives)) ## Further Reading - [Apollo Federation Subgraph Specification](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/subgraph-spec) - [Apollo Federation Directives Reference](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/directives)