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
Add isExtractableFile, appendFile, FormData options #179
Conversation
Thoughts on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to leave you hanging, I'm been absolutely flat out the last few days (1.5hrs sleep last night!). This approach is very close to what I had in mind. Could the Windows support related changes please be moved to a different PR? I'm not actually sure I'm keen to support Windows TBH; there can be quite extensive and nuanced things that need tweaking.
Done. |
Except the part about making a separate PR, if you are not into merging, I will hold off for now on that. :) |
Hope you are sleeping better! No real rush, just giving you a reminder. :) |
@jaydenseric anything I need to do to update this? |
I was working on documentation and changelog entries for it last night, and hope to finish it up sometime soon. I’ll take it from here :) |
Cool, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for kicking this off 🙌
A little more work needs to be done before this can be released - testing it out in with the example project revealed that the way |
I guess it used to work because the link was never used server-side. I would think that is just incorrect usage, because in theory the link could be used server-side and so FormData should be required to be defined when using SSR via polyfill or argument. Not sure, though! |
For backwards compatible, I guess FormData should be set to default at runtime rather than link creation, but that is not parallel to fetch, seems wrong. |
Actually, i guess whatever, as long as fetch and FormData treated the same |
It's a tricky one! Either way the solution will be a little opinionated. It's probably ok for I'm not totally against requiring |
I guess cross-fetch in the example is similarly required to be included, but not being used, I guess then the defaults for both should just be substituted at runtime, doubt significant increase in execution time/memory use. |
Do you want me to modify PR? |
I think runtime defaulting is least breaking change and that's the way I would go at this point. |
No, if you would like to work on a solution please do it as a new PR against |
To test it out with the examples project:
|
Not sure if this is windows thing: C:\Users\Yaacov\Documents\github\apollo-upload-examples\app>npx install-from ....\apollo-upload-client |
Closes #172. Simply adding customization options for apollo-upload-client greatly facilitates creation of a link that can support schema stitching.
See one implementation at:
https://github.com/yaacovCR/graphql-tools-fork/blob/with-apollo-upload-client/src/links/createServerHttpLink.ts