Skip to main content
fastql.federation adds Apollo Federation v2 support to any FastQL schema: federation directives as applied-directive metadata, a federated-SDL printer with the @link import header, and the _service / _entities machinery for entity resolution.

Installation

Federation support is built into FastQL — no extra install required. Import from fastql.federation:

Defining a federated schema

Decorate types with federation directives and build a regular Schema. FastQL injects the _service { sdl } root, the _Any / _Entity / _Service types, and the _entities(representations:) root field automatically.
print_federated_schema produces the federation-annotated SDL that the Apollo Router ingests as the subgraph SDL.

Available directive helpers

All helpers are applied via @Type(directives=[...]) or @Field(directives=[...]).
Next: Entity resolution@key and reference resolvers.