All Questions
Tagged with apollo-federation node.js
28 questions
0
votes
1
answer
23
views
How to get zone-specific stock information for materials?
Problem Description:
I'm working with a federated GraphQL setup involving three services: Material, Zone, and Stock. Each service has its own type definitions:
Zone Service:
Extends the Material ...
0
votes
0
answers
304
views
How to Use @defer Directive in GraphQL Federated Application with NestJS
I am working on a GraphQL federated application using NestJS, and I'm trying to implement the @defer directive to enable partial query execution and improve the performance of my GraphQL API. However, ...
1
vote
0
answers
361
views
How to call mutation from one subgraph to another in Apollo federation gateway GraphQL
There is 2 subgraphs User and Posts, I want to create post and add newly created post Id to the user's posts array.
User and Post are different services with different databases.
createPost mutation ...
0
votes
0
answers
49
views
Is the Apollo Federation loosely coupling?
I am pretty new to microservices architecture and Apollo Federation. I am curious: is the Apollo federation really loosely coupled? Because if a subgraph doesn't work in Node.js, the gateway also ...
0
votes
0
answers
163
views
Union of responses from two different subgraphs
I was looking into apollo federation but was not able to deduce from a first scan of their docs if I will be able to respond from the router with union of responses from two different subgraphs.
For ...
5
votes
1
answer
3k
views
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 ...
1
vote
2
answers
2k
views
Forward request headers - apollo federated gateway
I'm using the following versions:
"@apollo/gateway": "^2.1.3"
"@apollo/server": "^4.0.0"
"graphql": "^16.6.0"
I can't get a handle on the ...
1
vote
0
answers
72
views
ApolloGateway: How to make a gql call after receiving a response
I have a simple ApolloGateway server, which receives a gql mutation. What I am trying to accomplish is to make another gql mutation upon receiving a success call from the mutation call.
I can see that ...
0
votes
1
answer
961
views
Resolve Same Entity in Different Services
I have use-case where same entity type needs to resolved in multiple service, for example
Service A has type Post
type Post{
id: ID!
title: String
}
Service B has same type Post
type Post{
...
1
vote
0
answers
566
views
Is there a reason why I'm getting "Cannot POST /api/graphql" Apollo Federation when using apollo-server-express?
I'm relatively new to Apollo Federation and have been trying to get cookie-session to work for my authentication. My auth service works fine with apollo-server-express
// auth/src/index.ts
import '...
10
votes
1
answer
3k
views
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 ...
2
votes
1
answer
306
views
Use Rover with graphql-shield
I'm using graphql-shield on a subgraph and rover-cli to generate the schema.
I've set the fallback rule to deny everything as I don't want anything to be accessible by default. But now rover-cli fails ...
0
votes
1
answer
459
views
How to differentiate between a resolver call from federation and from client?
I am working in a GraphQL project using node + typegraphql + apollo-server.
My goal is to have specific metrics for regular queries, and separately, from federations. Is it possible to differentiate ...
2
votes
2
answers
3k
views
Apollo federation throws error: marked @external but is not defined on the base service of
i'm using apollo federation and meet with error, when trying to make something similar to computed fields (https://www.apollographql.com/docs/federation/entities/#extending-an-entity-with-computed-...
0
votes
1
answer
2k
views
Apollo Federated Gateway returns an error when trying to use a .NET Core GraphQL federated subgraph
I am trying to learn Apollo Federation, so I started by looking at their sample (https://github.com/apollographql/federation-demo). This sample repository works great, and I can add a new service as a ...
0
votes
1
answer
419
views
GraphQL Federation Nodemon breaks Gateway on Restart
I'm struggeling to setup my GraphQL Federation development environment. I have a few services and I want the server to automatically restart whenever a file changes. I am using Typescript, so ...
2
votes
1
answer
2k
views
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 ...
1
vote
1
answer
613
views
Apollo Server Federation not resolving?
First of all thanks for reading this, I have spent the last day on this one bug that I am simply unable to figure out. I had it working before, but for some reason it just stopped. Basically, all the ...
1
vote
1
answer
580
views
apollo federation subscriptions on node 8.11.1
i'm new with apollo federation. I try to include subscritption which i have on my remote server (on other host written on aiohttp) to federation schema. And there are no issue when i start my node ...
2
votes
0
answers
355
views
How to log an API Gateway which is built with Apollo Federation and Apollo Gateway?
Logging looks a hard piece with the apollo graphql. How can we get more insights on the activities happening in a federated gateway. I tried morgan but that is good with the REST based perspective. ...
3
votes
1
answer
3k
views
Type 'IResolvers<any, any>' is not assignable to type 'GraphQLResolverMap<any>'. 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';
...
0
votes
2
answers
256
views
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": ...
0
votes
1
answer
584
views
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 ...
2
votes
1
answer
4k
views
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 ...
2
votes
0
answers
473
views
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 ...
0
votes
1
answer
2k
views
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 ...
5
votes
1
answer
2k
views
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 '...
3
votes
0
answers
652
views
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 ...