--- id: graphene-federation version: "3.3.0" license: MIT license_treatment: permissive maintenance: aging --- # graphene-federation — Federation implementation for graphene License: permissive · Maintenance: aging · Downloads: 74.8K/mo ## What it is and what it does graphene-federation bridges Graphene (a Python GraphQL library) with Apollo Federation, a specification for composing multiple GraphQL services into a single federated graph. It provides decorators and utilities to mark types as entities, define external fields, and implement reference resolution—the core mechanics needed for a Graphene service to participate in a federated architecture. The package supports Apollo Federation specifications from v1.0 through v2.11, including directives like @key, @external, @requires, @provides, and @shareable. It integrates with graphene-directives for runtime validation of directive arguments. Most federation work involves decorating your types with @key or @extends, optionally defining __resolve_reference methods to fetch entities by their key fields, and building your schema with build_schema instead of the standard Graphene schema builder. Use it for: - Build a federated GraphQL gateway where multiple Python services each expose their own Graphene schema and the gateway composes them. - Extend types defined in other federated services (e.g., add reviews to a Product type defined elsewhere) using @extends and @external. - Implement entity resolution so a federated gateway can fetch specific instances of your types by their key fields during query planning. - Migrate an existing Graphene application to a federated architecture without rewriting your entire schema. - Share common types across multiple GraphQL services using @key and reference resolution. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds Apollo Federation support to Graphene GraphQL schemas, enabling multiple GraphQL services to compose into a federated graph following Apollo Federation specifications. Yes, if you are building a federated GraphQL system with Graphene and need Apollo Federation support. The package is stable and permissively licensed, with low install friction. The aging maintenance status (309 days since last release) is a minor concern but not a blocker—the repository is active and there are no known vulnerabilities. Install it when federation is a hard requirement; avoid it if you don't need multi-service composition. ## Install pip install graphene-federation uv add graphene-federation poetry add graphene-federation ## Installing graphene-federation Before you install: Low install friction with a pure Python wheel. Maintenance status is aging—last release was 309 days ago—but the repository remains active and not archived, with recent commits as of 2025-10-09. License in practice: MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice. Quickstart: pip install graphene-federation from graphene import ObjectType, String, Int, Field from graphene_federation import build_schema, key @key("id") class User(ObjectType): id = Int(required=True) name = String() class Query(ObjectType): user = Field(User) schema = build_schema(query=Query) Verify before relying: - Whether the package supports all Apollo Federation v2.11 directives equally well in practice or if some have known limitations. - Performance characteristics when handling large federated graphs or complex entity resolution scenarios. - Current adoption and community support level given the aging maintenance status. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 74.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags graphql federation graphene, apollo federation python, federated graphql schema, graphene subgraph, multi-service graphql, graphql service composition, apollo subgraph support, graphql, federation, schema-composition [View on SkillFed](https://skillfed.io/packages/graphene-federation) · [View on PyPI](https://pypi.org/project/graphene-federation/)