Strawberry supports Apollo Federation out of the box, that means that you can create services using Strawberry and federate them via Apollo Gateway or Apollo Router.
Strawberry is a schema first library, to use Apollo Federation you need to add directives to your schema, types and fields. Strawberry has built support for directives, but it also provide shortcuts for Apollo Federation.
All shortcuts live under the
strawberry.federation module. For example if you
want to create an
Entity you can do:
@strawberry.federation.type(keys=["id"])class Book:id: strawberry.IDtitle: str
And strawberry will automatically add the right directives to the type and schema.
If you want to get started with Apollo Federation, you can use our Apollo Federation guide.