Skip to main content

See https://github.com/remorses/tartiflette-apollo-federation-example for an example For now the plugin only supports simple sharing of types with the same fields and merging of the query and mutation fileds, In the near future there will be support for the @keydirective and a new @ResolveReference('TypeName') decorator to resolve the types between servers, similar to how Apollo __resolveReference works.

To suggest other better api ideas on how to implement __resolveReference open a issue.

Installation

pip install tartiflette_plugin_apollo_federation

Usage

from tartiflette_aiohttp import register_graphql_handlers
from tartiflette_plugin_apollo_federation import ApolloFederationPlugin

def run():
    engine_sdl = "./sdl/"
    app = register_graphql_handlers(
        app=web.Application(),
        engine_sdl=engine_sdl,
        engine_modules=[
            ApolloFederationPlugin(engine_sdl=engine_sdl)
        ],
        executor_http_endpoint="/graphql",
        graphiql_enabled=True,
    )
    web.run_app(app, port=PORT)

run()

Then use xmorse/apollo-federation-gateway to glue together your services

version: '3'
services:
    service1:
        build: ./service1
    service2:
        build: ./service2
    gateway:
        image: xmorse/apollo-federation-gateway
        ports:
            - 8000:80
        environment: 
            URL_0: "http://service1:8001/graphql"
            URL_1: "http://service2:8002/graphql"

Metadata

Release files for tartiflette-plugin-apollo-federation 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tartiflette-plugin-apollo-federation 0.0.6
File Size Uploaded Provenance
tartiflette_plugin_apollo_federation-0.0.6.tar.gz 3.1 kB Without provenance Details

Release files / tartiflette_plugin_apollo_federation-0.0.6.tar.gz

Download URL tartiflette_plugin_apollo_federation-0.0.6.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4fbfc43955e0ac7a84addeb9a35f4e64ef1fe5184c3090cf1dcd0291fdf7c8
BLAKE2b-256 checksum
How to use checksums
b3ec0e675405e78557187c534e5a14e116603297c66b605de0778cea17eb7ed7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

Security for tartiflette-plugin-apollo-federation 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page