Skip to content
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

Best way to have upload support #411

Closed
vinu opened this issue Oct 4, 2017 · 3 comments
Closed

Best way to have upload support #411

vinu opened this issue Oct 4, 2017 · 3 comments

Comments

@vinu
Copy link
Contributor

vinu commented Oct 4, 2017

What is the best way to have upload support with the starter kit, I was thinking to use https://github.com/jaydenseric/apollo-upload-client and https://github.com/jaydenseric/apollo-upload-server
or should I just create a rest endpoint /upload to handle all the uploads and just use graphql to save the references?

@mairh
Copy link
Member

mairh commented Oct 4, 2017

We have image upload feature in the pipeline #176

Doing image upload using graphql mutation is fine and doesn't have any security/performance impact on the application. One of the major service for backend https://www.graph.cool/ also does the file upload using graphql mutations.

At the moment Apollo Upload Client and Apollo Upload Server seem to be the go-to choice. However, keep in my mind that we have already switched to Apollo V2 and Apollo Upload Client does not support V2 out of the box yet (Check Issue).

You need to use Apollo Fetch Upload along with Apollo Upload Client to make it work for V2.

Here is one example https://github.com/jaydenseric/apollo-upload-examples/blob/master/app/helpers/with-data.js#L23

We welcome all PR's. So in case, you manage to get it working with the kit. We will appreciate if you could submit a PR for that.

@mitjade
Copy link
Collaborator

mitjade commented Oct 11, 2017

#421

@vinu
Copy link
Contributor Author

vinu commented Oct 11, 2017

woohooo 👍

thanks guys, I am closing this :)

@vinu vinu closed this as completed Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants