File Upload on apollo gateway

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 ? 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

Share
Improve this question

1

  • What's the error?

    – Manuel Spigolon

    42 mins ago


Load 4 more related questions


Show fewer related questions

0

Reset to default



Browse other questions tagged

or ask your own question.

Leave a Reply

Your email address will not be published. Required fields are marked *