Tag: mercurius
-
Another way of merging graphql resolvers
0 In many tutorials that I have read, the most common way of using graphql resolvers is like below. export const rootResolvers: IResolvers = { Query: { getUserById: async (root, { id }, context, info) => { return await getUserController(id); }, getUsers: async (root, args, context, info) => { return await getUsersController(); }, }, Mutation:…
-
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 ?…
-
Mercurius-codegen error Cannot find name ‘_Service
0 I am implementing a graphql api subgraph using Mercuriusjs, @mercurius/federation and typescript by following their doc. But always getting error Here are some parts of my code. server.ts const app = Fastify(); const PORT = 4001; const buildContext = async (req: FastifyRequest, _reply: FastifyReply) => { return { authorization: req.headers.authorization, }; }; type PromiseType<T>…