Closed zanechua closed 3 years ago
And of course.. I had to learn that you are actually able to access the express request and response by using request.raw
and reply.res
respectively. So I think this issue is unwarranted.
For those that need to know how to implement this with Fastify and ApolloServer please looked at the linked issue above
Wondering if you would be keen to make a small change to
graphqlUploadExpress
on how it checks if a request is a multipart request.Currently the code is using:
as the check for multipart requests and i know the
.is
function is unique to express.However the rest of the code pretty much works well with fastify and I only had to change that line to:
If we make the change to use plain javascript instead of a specific express function, it's a little more compatible with frameworks somewhat compatible with express. Alternatively, we could create an entire new file called
graphlUploadFastify
but I think that'll just be duplicating code.Let me know and if you're fine with the change and I will create a PR for it