Skip to Content

Configure Apollo Federation DataSource

Published: September 09, 2021

WunderGraph is a complete replacement for the Apollo Federation Gateway. Simply pass all your services endpoints to the introspect.federation func and you're almost there.

Once you have it introspected, pass it to the Application and you're good to go.

All this can happen "offline", during development or in your CD pipeline. There will be no introspection in production. You can fully disable introspection once you're shipping to prod.

const federatedApi = introspect.federation({
source: IntrospectionPolicy.Network,
upstreams: [
{
url: "http://localhost:4001/graphql"
},
{
url: "http://localhost:4002/graphql"
},
{
url: "http://localhost:4003/graphql"
},
{
url: "http://localhost:4004/graphql",
},
]
});

Product

Subscribe to our newsletter!

Stay informed when great things happen! Get the latest news about APIs, GraphQL and more straight into your mailbox.

© 2021 WunderGraph