apuyou / apollo-server-nextjs

Apollo Server for Next.js API routes
16 stars 0 forks source link

how about graphql-upload #1

Open tsvetann opened 2 years ago

tsvetann commented 2 years ago

Hi Thanks for this example. I would be curious to see if you could add upload functionality to the apollo-server-express implementation for nextjs 12.

Thx

apuyou commented 2 years ago

Hi, thanks for your feedback.

It doesn't look like upload is supported with apollo-server-lambda, on which this package is based. I'm not sure how this could be added in a generic manner (without adding graphql-upload as a dependency for all users of this package).

However, based on what I've seen on the graphql-upload documentation, you could write your own ApolloServer that would call the graphql-upload middleware. This is similar to what this package does with the middleware provided by apollo-server-express.