Tag: apollo-federation
-
Confusion in initialising GraphQL Dataloader in context
0 context: ({ req }) => { if (req) { return { ip: headers.userip, headers, userLanguage, decodedToken, dataLoaders: { seoDataLoader: createSeoDataLoader() } } } } Here I create a createSeoDataLoader instace for every request . now suppose if i have 50 loaders then for every request 50 loaders instance created and i think its not…
-
Cross-referencing a type with Apollo Federation across multiple sub-graphs
0 I am new to Apollo Federation and I am having the following issue / question: In Subgraph A I have the following: type Product @key(fields: "id") { { id: ID! title: String } In Subgraph B I have the following: type Product @key(fields: "id") { { id: ID! related: [Product] } When I run…
-
File Upload on apollo gateway
0 I have two graphql subgraphs server a and server b. Each running fastify and mercurius and using grapqql-upload to handle files. I also have an apollo gateway connected to both servers and working well for queries and mutations. However when using file upload I get a validation error. Anyone ever dealt with this ?…
-
NestJS + Apollo Federation Gateway Save Schema
0 Question When making the Apollo Gateway leveraging the NestJS GraphQL Module, how can you save the schema file? Background Normally with NestJS GraphQL support you can save the schema file with something like this. GraphQLModule.forRoot<ApolloFederationDriverConfig>({ driver: ApolloFederationDriver, autoSchemaFile: { path: join(process.cwd(), ‘./schema.gql’), federation: 2 }, playground: true }), However, it seems like for the…
-
How to implement Relay node query with GraphQL federation
3 We are trying to implement Relay node query with Apollo federation. Since Apollo is not aware of Relay, we have to implement the node query in some service (Node Resolution Service) interface Node { id: ID! } type Query { node(id: ID!): Node! } The trouble is that the Node resolution service is not…