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

Nestjs GraphQL Apollo Federation - resolver has an object in debug, returns an object with nulls

I am using NestJs, GraphQL apollo federation (schema first approach) and Mongoose. While querying for the product or products resolver, the query returns an object where all the properties are nulls. However, while I debug and use a breakpoint in my…
0
votes
1 answer

Graphql Apollo Federation - Resolve a computed field based on implementing service

I'm using a GraphQL federation architecture and I am trying to add a new field to an extended type. For example, imagine I have a type in a remote federated schema: type Book { id: ID! authorFirstName: String authorLastName: String } And I…
TalS
  • 69
  • 6
0
votes
3 answers

Apollo Federation Resolve Array from IDs

I am using MongoDB as the database for my federated Apollo GraphQL API. (My code is in TypeScript) I have created a __resolveReference method for the Post resolvers object, and this works fine when I call it from the user service as follows: User:…
NG235
  • 1,091
  • 12
  • 33
0
votes
1 answer

How to achieve Asynchronous mutations using Apollo Gateway

When using Apollo Gateway, the Gateway will forward mutations directly to the concerned implementing service. Such requests are synchronous. Is there a way that Apollo Gateway can publish all mutations to a message broker like rabbitmq so that we…
0
votes
0 answers

Apollo Federation: How to access data from Input Request across federated services through resolver

Looking for an option to join graphQL API response using Apollo federation where Graphql APIs are built on top of POST services. To explain my usecase, I have created below dummy example. Two POST Services are User Service and Post Service Request…
user837593
  • 337
  • 1
  • 5
  • 25
0
votes
1 answer

Directly calling implementing service from the gateway

I'm using Apollo Federation, and I'd like to implement some custom auth behavior in the gateway, such as directly make a call to an implementing service from the gateway to get user data that I can then add as a header to be forwarded to the…
David Brown
  • 133
  • 1
  • 10
0
votes
2 answers

Best way to consume & combine another public apollo graphql apis: federation v schema stitching

I'm developing a backend-for-frontend (BFF) solution for a web client with apollo graphql Use-case background, our organization has a general use graphql api that another team owns and my team is creating another graphql server to consume it. This…
jVERM
  • 131
  • 1
  • 5
0
votes
2 answers

How to stitch schemas using apollo graphQL?

I am a java programmer learning graphQL. I have dataset as below sample where comment has postId, but post doestn't have comment information. comments { "postId": 1, "id": 1, "name": "id labore ex et quam…
user837593
  • 337
  • 1
  • 5
  • 25
0
votes
1 answer

Apollo Federation Gateway can't load when parent service goes down

I have 3 services: Org, Gatekeeper and Fleet. Gatekeeper and Fleet extend the Org schema from the Org service. then the Org server is up and running along with fleet and gatekeeper, everything works fine, but if org is down and I try run gateway…
0
votes
1 answer

How to convert GraphqlSchema into a Federation Schema?

When I passing existing GrpahqlSchema to buildFederatedSchema, I am getting below error Cannot read property 'kind' of undefined This is because when I pass GrpahqlSchema to buildFederatedSchema it is failing at its validations. at…
Srinivas
  • 294
  • 3
  • 18
0
votes
1 answer

Implementing Apollo Federation gateway using Express Framework

I'm currently working on a POC to implement Apollo Federation gateway in and NodeJS + express application. Up until now, I haven't really encountered any example on how to properly do it. So far, I encounter a problem where the ApolloServer module…
0
votes
1 answer

Apollo Federation: does Federation replace delegateToSchema?

Short version: Can I use Apollo Federation to replace the functionality of delegateToSchema, and if so, how? The idea is to reuse resolver logic from another service that is a black-box. Long version: I've been scouring the internet for hours trying…
-1
votes
1 answer

Source GraphQL API: HTTP error 400 Bad Request

I've set up an apollo federation architecture accessible via a gateway. I want to access it via gatsby using the official plugin gatsby-source-graphql. I've followed their documentation and attempted to include the plugin with the "simple"…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
1 2 3
13
14