This document defines a high level roadmap for Apollo Federation and upcoming releases. Community and contributor involvement is vital for successfully implementing all desired items for each release. We hope the items listed below will inspire further engagement from the community to keep Apollo Federation progressing and shipping exciting and valuable features.
Any dates listed below and specific issues that will ship in a given milestone are subject to change but should give a general idea of what we are planning.
We are actively maintaining both the original Federation 1 (on the version-0.x branch) and the new Federation 2 (on the main branch).
- Ability to add value type fields to one subgraph at a time, allowing those fields to be immediately usable by clients.
- Subscriptions support in query planning.
- Entity interfaces can be spread across multiple subgraphs & interface queries with
@interfaceObject
helper. - Harmonizing shared value types across subgraphs to a canonical desired state.
- Advanced caching, auth, demand control, rate limiting, governance, and more.
- Importing shared types into subgraph schemas, to keep things more DRY.
- Entity-based
@defer
support in query planning (in Preview). - Added @composeDirective to specify directives that should be merged to the supergraph during composition.
-
Backwards compatible with Federation 1
- Migration is a simple and incremental process
- @apollo/gateway v2.0.0 supports Fed 1 and Fed 2 supergraphs
- Composition 2.x auto-converts Fed 1 subgraphs with rover 0.5+
- Upgrade subgraphs one at a time with @apollo/subgraph v2
- New
@link
directive for subgraphs toimport
Fed 2 directives
-
Build with a smoother developer experience
- Cleaner syntax
- First-class support for shared interfaces, enums, and more
-
Deliver smaller increments with better shared types
- Flexible value type merging
- Hide fields with
@inaccessible
- #1178 - All types shared equally across subgraphs without
extend
- All fields have a single source of truth by default
@shareable
to opt-into denormalization of fields for performance
-
Field migration across subgraphs with
@override
- #1177- Accepts production traffic without downtime
- Remove the old field with no delivery coordination
-
Catch errors sooner with improved static analysis
- More descriptive error messages
- New composition engine validates all theoretically possible queries
- Composition hints to show divergence across merged types
-
More subgraphs support Federation 2 syntax
-
Enhanced test automation
- Federation Authorship UX design
- Enhanced shared ownership model & field sharing
- All fields have a single source of truth by default:
- relax ownership with
@shareable
to denormalize for performance #1176 @shareable
required to@provides
a field
- Updated join spec with Federation 2 enhancements
- Automatic conversion of Fed 1 subgraphs to equivalent Fed 2 subgraphs during Fed 2 composition
- Enhanced backwards compatibility test automation
rover
support for Fed 2 composition- @apollo/gateway v2.0.0-preview
- @apollo/subgraph v2.0.0-preview
- Updated Fed 2 docs & migration guide
-
Backwards compatible, requiring no major changes to your subgraphs.
-
New v2 Apollo Gateway -- continues to support all existing plugins and customizations.
-
New v2 Subgraph package -- separates composition from subgraph enablement code and is backwards compatible so no changes needed.
-
Rover CLI and Apollo Workbench releases with Federation 2 composition support.
-
Cleaner syntax for a smoother developer experience
- Build with any natural GraphQL schema
- First-class support for value type merging of shared interfaces, enums, and other value types.
- Common tasks like extending a federated type or denormalizing a field for better performance are now possible without special directives and keywords.
-
Deliver smaller increments with better shared types
- Improved shared ownership model with enhanced type merging
- Flexible
value type merging
is now supported- Value types don’t need to be identical across subgraphs.
- Value type definitions are now merged into a single unified type, much like type merging support for federated types today. Smaller incremental changes, like adding a field, can often be rolled out one subgraph at a time.
Federated entity types
have improved shared ownership- Fields can now exist in multiple subgraphs simultaneously.
- This paves the way for natively supported field migrations with an asynchronous transfer of ownership from one subgraph to another with no downtime or tight release coordination.
-
Catch errors sooner with improved static analysis
- Deeper static analysis, better error messages and a new generalized composition model that helps you catch more errors at build-time instead of at runtime.
- Clean-sheet implementation of the core composition and query-planning engine that powers the Apollo Gateway
- The rewritten composition engine now validates all theoretically possible queries and provides more descriptive error messages when a query can’t be satisfied.
-
New composition hints help you understand how schema definitions influence query planning and performance. We’ve integrated them into the powerful tools for Apollo Federation:
- Apollo Workbench shows composition hints in the problems tray with new hover tips.
- Rover includes composition hints in both standard and structured JSON output so you can integrate them with other tools in your pipeline.
- GraphOS Studio uses composition hints to help you ensure design guidelines and best practices.
-
v2 Gateway can run supergraph schemas produced using either Federation 1 composition or the new Federation 2 composition.
- Supergraph schemas specify the core features they require for
SECURITY
andEXECUTION
- Apollo Gateway observes the required core feature versions (like join) and uses the appropriate implementation.
- Supergraph schemas specify the core features they require for
-
For the latest Federation 2 release info see the
CHANGELOG.md
in each sub-project on the main branch. -
Let us know what you think on the Community Forum
-
Improved Gateway performance via new op-shape-based field usage reporting
- With Apollo Server 3.6+ expensive subgraph traces are not needed for field usage reporting.
- Set
fieldLevelInstrumentation
to 0.01 to sample 1% of requests for detailed field statistics. - Use
fieldLevelInstrumentation
for trace sampling instead of includeRequest for performance.
-
Improved Gateway performance with connection pooling for subgraph fetches by default
-
Ensure fetcher in
RemoteGraphQLDatasource
uses connection pooling / keep-alive. -
make-fetch-happen
does this by default. significant gains in our benchmark testing. -
Gateway 2.x uses
make-fetch-happen
by default; backported to Gateway 0.46 -
Replace
serviceList
API with more flexible, reactive option - #1180
-
- Originally released in 2019, Federation powers some of the largest graphs in the world.
- Some notable additions:
- skip fetches when possible (based on
@skip
and@include
usages) @tag
supported on subgraphs and composed into supergraphs - see https://specs.apollo.dev/@inaccessible
support on supergraphs
- skip fetches when possible (based on
- For the latest Federation 1 release info see the
CHANGELOG.md
in each sub-project on the version-0.x branch.
- Over 12 languages and GraphQL frameworks support acting as a subgraph in a federated graph.
- Their support is tracked in Apollo's subgraph compatibility repository.
- See Subgraph Library Maintainer Support to learn more.