Questions tagged [apollo-federation]

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.

https://www.apollographql.com/docs/federation/

208 questions
9
votes
1 answer

Inter-service communication between Apollo Federation subgraphs

Let's say we have S1, S2 subgraphs, and G gateway. S1 subgraph service needs some data from the S2 service. How should it be handled through the gateway and schema level? Should we use gateway in this kind of communication? Should we have a…
9
votes
1 answer

Using Apollo Federated GraphQL, is there a way to sort/paginate on a value from an external entity?

Is it possible to mark a field in an input to a query as requiring a field extended by a different service? Using the federation-demo to illustrate my question, but keeping a little bit more simple. Having just an Account service and a Reviews…
onthegojohn
  • 216
  • 2
  • 4
8
votes
1 answer

Is it possible to have partially federated gateway?

I'd like to federate services, but let the federation gateway also hold own schema and logic that would proxy REST API endpoints for simplicity. Now it looks like I need to have federation gateway service, federated graphql service(s) and the…
Ville
  • 464
  • 4
  • 14
6
votes
0 answers

nestjs + apollo graphql federated gateway can't introspect services because of "bad request", reproducible git repository available

In an NX monorepo I'm building 3 nestjs application, an auth-service + user-service and a gateway to start off with. They're all powered by apollo graphql and following the official nestjs documentation. The issue that I'm having is that with both…
6
votes
1 answer

GraphQL Federation : Is there a Java Springboot gateway

Is there a GraphQL federation gateway in Java / SpringBoot. Couldn't find any implementations in java. Saw few example with federated graph but the gateway was on native node . Checked both Apollo and netflix DGS…
6
votes
2 answers

Hasura GraphQL Endpoint behind Apollo Federated Gateway

Has anyone successfully placed a Hasura GraphQL endpoint, behind an Apollo Federated Gateway? I know Hasura wants to act as the point of federation but I would rather not do that...current thought is to create an apollo server with a remote schema…
T.Davidson
  • 89
  • 7
6
votes
3 answers

Auto Reload of gateway for schema changes in federated service apollo GraphQL

In Apollo Federation, I am facing this problem: The gateway needs to be restarted every time we make a change in the schema of any federated service in service list. I understand that every time a gateway starts and it collects all the schema and…
A.K
  • 320
  • 5
  • 14
6
votes
0 answers

@apollo/federation throws an error with the example from the docs

After running into an issue trying things out on my own, I tried the example from the docs and I ran into a similar issue, is the doc wrong, or am I doing something stupid? The example I am trying to execute is the one from this page:…
standup75
  • 4,734
  • 6
  • 28
  • 49
5
votes
1 answer

Apollo GraphQL dynamic authenticated subgraphs

I'm building an Apollo Gateway w/ Federated schemas - and I have many subgraphs - each of them has their own authentication token (e.g many REST APIs, each user has his own token saved in the database for each REST API). I'm fetching the token for…
5
votes
1 answer

How to federate two apollo services that provide the same type

I am new to apollo and I have two apollo service that I want to federate by using apollo federation: Productservice: extend type Query { job(id: String!): Job } type Seo { title: String! description: String! keywords: String! } type…
simsi
  • 533
  • 3
  • 16
5
votes
1 answer

Only HTTP(S) protocols are supported in apollo gateway

I am trying to run apollo gateway locally using the managed configuration from apollo's managed solution. It loads the schema and everything is fine but when I try a query in the playground I get 'Only HTTP(S) protocols are supported'. I know I can…
Niall
  • 804
  • 10
  • 27
4
votes
0 answers

Caching in microservices architecture Nestjs + Apollo federation

I am looking for a way to implement caching in Nestjs + graphql. I have distributed my services with apollo federations, Hence using microservices architecture. I want, if anything inside graphql query, headers, params will change then it should…
Kelly
  • 131
  • 7
4
votes
2 answers

What is the difference between GraphQL-Mesh and Apollo-Federation?

What is the difference between GraphQL-Mesh and Apollo-Federation? I see that mesh support federation, which is kind of confusion? Is it just two different ways to achieve a unified schema? Why would you pick one solution rather than the other?
Olivier Refalo
  • 50,287
  • 22
  • 91
  • 122
3
votes
1 answer

How to resolve type from another subgraph in a Apollo GraphQL federated schema?

I have an Order subgraph and a Menu subgraph. The order subgraph returns customers orders and the Menu subgraph return information about menu's and the menu items. When I fetch an order, I want the order data returned from the Order subgraph but…
Stretch0
  • 8,362
  • 13
  • 71
  • 133
3
votes
0 answers

NestJS code first graphQL missing federation directives

I'am trying to use the graphQL federation v2 (supergraph) with NestJS in a code first approach. My problem is that I need to use some specific directives such as @inaccessible, @shareable or @provides, but those directives are not defined in the…
Cabrinha
  • 440
  • 1
  • 3
  • 15
1
2 3
13 14