-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support apollo-upload-client #447
base: v5
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for apollo-module canceled.
|
Since Vite/Rollup does not always support CJS to ESM I have used the @originjs/vite-plugin-commonjs plugin to be able to use apollo-upload-client. Webpack does not seem to have this issue. |
thank you @art-boer! Im slowly moving to nuxt3 and wanted to implement the same. |
@Diizzayy Any chance to have a look at it yet? If you need me to look at an alternative implementation or solution for the ESM import then let me know! I would love to help out. |
✅ Deploy Preview for apollo-module canceled.
|
@Diizzayy I have found a better way to fix the import of apollo-upload-client, without using yet another Vite plugin. A simple alias for 'apollo-upload-client' pointing towards the index.mjs file does the trick! |
any updates here guys |
is there a reason this has not been reviewed yet or is there another implementation? |
Is there a reason this PR hasn't been merged? Not being able to handle file uploads is a blocker for many projects, which creates a trap for those upgrading from Nuxt 2. Nuxt 2 Apollo doesn't work on supported Node versions, and Nuxt 3 Apollo is missing this critical feature. There's no obvious workaround for this without support in the module. |
any updates? |
1 similar comment
any updates? |
Support for apollo-upload-client
Sometimes you want your client to be able to communicate with a GraphQL server that has uploads enabled, however, you would also need a HttpLink that supports the uploading of files.
In this MR I have created a conditional option (per client) for using the Upload HttpLink instead of the default Apollo HttpLink.