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

Added back, but deprecated, the file upload stream property. #107

Merged
merged 3 commits into from
Aug 17, 2018

Conversation

jaydenseric
Copy link
Owner

Accessing an Upload scalar promise resolved stream property results in a deprecation warning that recommends using createReadStream instead. It will be removed in a future release.

A stream getter creates the stream using createReadStream the first time it is accessed, then reuses the stream following times. It also serves the deprecation warning.

@jaydenseric
Copy link
Owner Author

@mike-marcacci is this the right thing to do, and how should it be documented? I think maybe don't document stream (the way it is now) and rely on the deprecation warnings to help people who are upgrading migrate.

Copy link
Collaborator

@mike-marcacci mike-marcacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fantastic strategy. I like that the initial stream is memoized to replicate the current behavior.

@jaydenseric jaydenseric merged commit 8b37214 into master Aug 17, 2018
@jaydenseric jaydenseric deleted the deprecated-stream branch August 17, 2018 06:53
matijagaspar added a commit to matijagaspar/apollo-upload-client that referenced this pull request Sep 20, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants