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
0 answers

A would like to extend reviews with posts in apollo-federation

I have currently a post microservice, I would like to create a generic review microservice to plug it on every microservice who needs it later (ike products). To do that, I tried something like this Reviews microservice Review entity import {…
Pompedup
  • 566
  • 2
  • 8
0
votes
0 answers

Route url with variable in apolloGateway

There are several services that process graphql-requests on relative URLs. Example: http://service:8080/graphql/a3333333-b111-c111-d111-e00000000011. And I don’t understand how to config apolloGateway that part of url is a variable. Try config url…
Nukopol
  • 11
  • 1
0
votes
1 answer

Running Nestjs version 9 with Graphql and apollo server v4 gives Error: Cannot find module 'apollo-server-core'

I am trying to build a nestjs graphql with federation Schema with schema first approach monorepo of two microservices AUTH and LEDGER and a GATEWAY the AUTH microservice appModule.ts looks like this: import { AuthModule } from…
MichaelE
  • 757
  • 14
  • 42
0
votes
1 answer

Can I force an Apollo Supergraph to point to specific Subgraph?

I'm building a GraphQL Federated project with Apollo Router and multiple endpoints via Supergraph arquitecture for a centralized API, based on the Apollo Docs, and using Rover for the composition:…
0
votes
0 answers

Can not use redis cache for apq/query_planning in apollo router 1.6.0

I have been trying to use the experimental_cache feature, specifically the external caching with redis. In the documentation (Caching in the Apollo Router - Apollo GraphQL Docs) it states that “it can be tested by building a custom Router binary,…
Oskar
  • 90
  • 1
  • 10
0
votes
0 answers

Is it possible to have @extends type for a non-existing parent type

I am trying to use Graphql federation in multiple service configurations, where some services might be present in one configuration, while others - in another. The type extension is not callable directly in each service subgraphs and is only turned…
Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35
0
votes
0 answers

graphqlError.stack?.split is not a function

I have a response coming from a subgraph: { errors: [ { errcode: '23505', extensions: [Object], message: 'duplicate key value violates unique constraint "company_name_idx"', locations: [Array], path: [Array], …
Dudo
  • 4,002
  • 8
  • 32
  • 57
0
votes
0 answers

Resolve by ID interface Graphql federation (Apollo)

I am trying to resolve an interface by ID with netflix-dgs and Apollo federation. But the DgsEntityFetcher does not seem to be registered for interfaces. I also tried declaring entity resolvers for types B and C and still null result. Here is a…
0
votes
1 answer

Inherited apollo entities resolving to null

I faced a problem with Apollo federation, which in the end I couldn't resolve. I dug through the documentation and issues, which I was able to google out here on stackoverflow and github. Let me introduce you to a context a little bit. I am using…
0
votes
0 answers

apollo federation Can I process this remotely like a hook resolver before request?

My question is as in the title. When configuring the gateway using apollo federation, there are query parameters that I do not want to expose to the supergraph. Can I process this remotely like a hook resolver before request?
COLEAN
  • 665
  • 2
  • 9
  • 24
0
votes
0 answers

How to change selectionSet from hook resolver in apollo

How can I use apollo to change selectionSet in field resolver through one resolver without using stitch and extend resolver?
COLEAN
  • 665
  • 2
  • 9
  • 24
0
votes
0 answers

How to use selectionSet in graphql field resolver

I'm writing code that needs to use the extend schema. But I can't use stitch because I'm using federation. So I am implementing a field resolver with one local graphql schema, but I want the server to add the fields needed by the field resolver. How…
COLEAN
  • 665
  • 2
  • 9
  • 24
0
votes
1 answer

graphql federation -- gateway isn't forwarding RESPONSE headers

I have a node + nest graphql api with a gateway and subgraphs. I have already configured the REQUEST headers to be forward to my subgraphs. The problem I now have is opposite, it seems that the gateway strips away any custom response headers set by…
0
votes
0 answers

Apollo gateway caching

I have service Test-Service which provides some data via graphql and Apollo Gateway. And I would like to cache requests on Apollo gateway, but it doesn't work, I still see in logs of Test-Service that it receives requests. Here is code of Apollo…
0
votes
0 answers

(Apollo Federation) How to route gateway's own schema

I am configuring a federation using apollo-gateway. Many services can be provided through the gateway, but functions such as authentication would like to be provided by the gateway itself. I am using supergraphsdl and implemented subgraph without…
COLEAN
  • 665
  • 2
  • 9
  • 24