Apollo Federation is an architecture for composing multiple GraphQL services into a single graph that addresses this need. Unlike other approaches such as schema stitching, it is based on a declarative composition programming model that allows proper separation of concerns. This design allows teams to implement an enterprise-scale shared data graph as a set of loosely coupled, separately maintained GraphQL services.
Questions tagged [apollo-federation]
208 questions
3
votes
0 answers
ApolloGraphQL implement Shared Schema across a federated GraphQL service
I'm currently following a tutorial that composes multiple subgraphs into a supergraph, which is great for separation of concerns. What I'm wondering is it possible to have multiple subgraphs split out contributing data to a shared schema.
So for…

Squiggs.
- 4,299
- 6
- 49
- 89
3
votes
0 answers
Apollo Server federation resolvers: how to gracefully handle entity not found?
When using GraphQL federated resolvers to resolve an array, and one of the resolved items cannot be found:
Observed behaviour: null data returned for entire query, no error message.
Desired behaviour: the item which cannot be resolved is silently…

Fletch
- 4,829
- 2
- 41
- 55
3
votes
0 answers
ApolloGraphQL Federation Gateway on AWS Lambda Cannot read property 'QUERY' of undefined
I'm trying to set up a test federated GraphQL instance using serverless lambdas. Right now I have the products subgraph deployed on one lambda and the gateway deployed on another lambda. Queries to the products lambda work fine; however, making the…

user18175917
- 31
- 1
3
votes
1 answer
How to get the schema of an Apollo federation without running the whole code?
I want to implement operational and composition checks on my federated graph. To do this, I need either a schema file or I need to pipe the results of the graph introspection query into the rover command that does the check. I don't have a file…

Supperhero
- 911
- 1
- 7
- 24
3
votes
1 answer
NestJS and Apollo Federation: buildFederatedSchema is deprecated
I am working with NestJS and Apollo Federation for a while and it seems that since last update I get
"(node:19113) DeprecationWarning: 'buildFederatedSchema' is deprecated. Use 'buildSubgraphSchema' instead."
I don't see a place where I could use…
3
votes
3 answers
How to implement Relay node query with GraphQL federation
We are trying to implement Relay node query with Apollo federation. Since Apollo is not aware of Relay, we have to implement the node query in some service (Node Resolution Service)
interface Node {
id: ID!
}
type Query {
node(id: ID!):…

Lukas
- 13,606
- 9
- 31
- 40
3
votes
0 answers
apollo-federation validate input field in another subgraph
in microservice project I have configured graphql, apollo-federation, apollo-gateway.
Menu service
mutation createMenu(location_id: ID!): Menu
Location service
type Location{
id: ID!
}
type Query{
location(id: ID!): Location
}
in menu…

Ozal Zarbaliyev
- 566
- 6
- 22
3
votes
1 answer
Type 'IResolvers' is not assignable to type 'GraphQLResolverMap'. Index signatures are incompatible
I follow the guide for Apollo Federation: Implementing services
Code here:
import { ApolloServer, gql, IResolvers } from 'apollo-server';
import { buildFederatedSchema } from '@apollo/federation';
import faker from 'faker';
const MemoryDB = {
…

Lin Du
- 88,126
- 95
- 281
- 483
3
votes
1 answer
Apollo Federation cannot get connection running in docker-compose: Couldn't load service definitions for...reason: connect ECONNREFUSED 127.0.0.1:80
I am trying to run two applications by docker-compose without success, the federation cannot connect on service. Both works well out of docker.
Below follow the projects:
Apollo Server Federation in NodeJS
GraphQL API In Kotlin + Spring Boot +…

Cristiano Quadros
- 31
- 1
- 2
3
votes
2 answers
Passing variables to an external resolve reference
I'm using Apollo Federation for 2 months but I'm actually stuck. I've no idea how to pass a variable between my two graphql services.
I've got a website (website graphql service) which have orders (orders graphql service).
I have a query to find…

Joe Allen
- 1,267
- 4
- 24
- 41
3
votes
0 answers
Is it possible to mock GraphQL services at the gateway level?
Imagine the following Node (simplified) module. It defines a Hapi server using an underlying Apollo federated gateway. The server has a /graphql route capable of accepting GraphQL requests and aggregating data from several federated GraphQL…

Mario Gil
- 493
- 1
- 5
- 14
3
votes
0 answers
How to setup Apollo Gateway with managed federation?
After reading the Apollo docs on managed federation, I configured my Apollo Gateway exactly as described in the article. Basically I didn't pass anything to the ApolloGateway constructor. The ENGINE_API_KEY is provided in my .env file and should be…

Julius Niedermeier
- 53
- 3
3
votes
0 answers
Is it possible to use Apollo Federation with GraphQL Nexus and Nexus Prisma?
We want to use Nexus and Nexus Prisma but are also planning on using Apollo Federation in the near future.
I saw an open issue that Nexus doesn't support Apollo Federation out of the box:
Apollo Federation support #148
But is it possible to use them…

brafdlog
- 2,642
- 1
- 18
- 21
3
votes
1 answer
Apollo federation with gateway server as service
The summary of the issue has been described in a Github issue:
https://github.com/apollographql/apollo-server/issues/2794
In short, is there a way to implement Apollo Federation such that the gateway itself has it's own schema?
Federating Apollo…

Caleb Faruki
- 2,577
- 3
- 30
- 54
2
votes
0 answers
How do you order by a left join with graphql apollo federaton?
I'm using apollo federation. I need to order owners by if they written a product review for a particular product, and then the ones that haven't last.
In psql world it's really simple
select * from owners o
left join reviews r on o.id =…

user133688
- 6,864
- 3
- 20
- 36