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
2
votes
1 answer

Multiple ApolloServers needed to implement a gateway connecting to REST APIs?

I'm building a graphql gateway service, which merge multiple services into one graph, using Apollo/Node/Express and following the Apollo Federation model. Initially, most of the services I'll be connecting to are REST services. In all of the…
n10n
  • 21
  • 1
2
votes
2 answers

how to hot reload federation gateway in NestJS

Problem In a federated nest app, a gateway collects all the schemas from other services and form a complete graph. The question is, how to re-run the schema collection after a sub-schema has been changed? Current Workaround Restarting the gateway…
xiao
  • 133
  • 1
  • 1
  • 9
2
votes
0 answers

Apollo federation: Field/resolver that returns entities from two separate services that implement an interface

Summary In GraphQL Apollo managed federation, I'm trying to figure out if it's possible for one service to have an aggregate field, that returns an array of entities two separate services. As in, I'm trying to support this use case: query…
Andy Ray
  • 30,372
  • 14
  • 101
  • 138
2
votes
0 answers

How can I make managed federation work offline?

I wanted to set up Apollo Studio for an Apollo Federation API following this guide. In there I stumbled upon the following sentence regarding the serviceList in the gateway: With managed federation, this information is no longer hardcoded in the…
puchm
  • 137
  • 7
2
votes
0 answers

Netflix Gateway implementation

So I was reading an article about how Netflix scales its API with graphql federation. In second part of this article I noticed a fact that Netflix has developed a special Gateway based on apollo federation…
2
votes
1 answer

connect ECONNREFUSED, Apollo Federation

I decided to study the Apollo Federation by the example from their website. I have three services that I am trying to merge under a federation, but I catch this error: Error checking for changes to service definitions: Couldn't load service…
2
votes
1 answer

Mutation Input Split Across Two Apollo GraphQL Federated Services

I have a mutation in my Graph that uses two datasources. We are migrating one of the datasources out to a federated service. That datasource in the federated service uses a portion of the input from the mutation being called. The originating service…
kbanner
  • 149
  • 6
2
votes
0 answers

Forward header to implementations

I'm building a graphql api with gqlgen and apollo federation as a gateway. in gqlgen, I have three services: static page, accounts, auth. And I'm using apollo federation as a gateway. For the auth section I need to get Authorization header like…
Gep Gecici
  • 77
  • 1
  • 8
2
votes
0 answers

Apollo Federation schema, representations incomplete

I have this query: getMyTransactions { id createdAt } And I got this error: "message": "Cannot return null for non-nullable field Transaction.createdAt.", "path": [ "_entities", 0, "createdAt" ], "extensions": { "code":…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
2
votes
1 answer

GraphQL, Apollo Server Federated schema

I get this error while querying: "Cannot return null for non-nullable field Transaction.createdAt." This is the query: query getMyTransactions { getMyTransactions { id createdAt } } The schema for this query is: extend type Transaction…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
2
votes
2 answers

Building GraphQL services in isolation with apollo-federation

I'm currently trying to test 1 service's graphql endpoint that will eventually be apart of an apollo-federation/gateway graphql server. This service will extend a type in an existing service in the existing federated graph. If I want to test my…
Mike Lyons
  • 22,575
  • 2
  • 16
  • 19
2
votes
1 answer

Graphql federation returning null on extended relation

I'm trying to setup a prototype for using graphql across multiple java microservices, which requires me to join multiple graphql schema's into one. I'm using 2 java-services and the ApolloServer with ApolloGateway; which shows the following schema…
Michiel D
  • 126
  • 1
  • 10
2
votes
1 answer

Apollo gateway not picking up managed federation configurations

This could be quite new to everyone but hoping for the best to find out the solution. I've been trying to setup apollo managed federation through ApolloGateway for federated my services by following the official documentation.…
Sheraz Ali
  • 315
  • 6
  • 19
2
votes
0 answers

Graphql Node Fetch File upload

I am currently trying to implement Apollo Federated Servers. However the issue i am facing is that apollo federation does not pass down files to resolvers in federated services. So in the gateway i need to POST the file to my rest endpoint see…
tom Bannister
  • 149
  • 2
  • 12
2
votes
1 answer

Apollo federation for small projects

I am new to graphQL, Apollo etc. Soon I will be working on a low-cost app with 3 (rest-api) datasources and only 1 consumer to create (mainly) a User Type. It's planned to use serverless functions as hosting. I've been reading on schema stitching,…
control-panel
  • 255
  • 6
  • 17