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 ? Do I need to process the uploaded file in both the gateway and the subgraphs
I have tried processing the file on both the gateway and the subgraph as well as only on the subgraph and on only on the gateway using
app.addHook("preValidation", async (req, res) => { if ( !req.headers?.["content-type"]?.includes("multipart") || req.url !== "/graphql" ) { return; } const body = await processRequest(req.raw, res.raw); console.log(body); req.body = body; });
however i’m still unable to upload files i run into graphql validation error
1
What's the error?
42 mins ago
|