-
Notifications
You must be signed in to change notification settings - Fork 8
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: remove the need for content-length #22
Conversation
This removes the need for `Content-Length`, and handles the boundaries such that the next boundary is flushed as soon as possible. References: - graphql/graphql-over-http#152 - fmg relay-tools/fetch-multipart-graphql#22 - [meros](https://github.com/maraisr/meros)
this.chunkBuffer = ''; | ||
this.isPreamble = true; |
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.
can you explain what is and the importance of the isPreamble
?
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.
Everything before the first boundary should be ignored. So this just tracks that we've passed the first boundary. Another way could have been to increment a number, and simply not yield if less than 1.
This removes the need for `Content-Length`, and handles the boundaries such that the next boundary is flushed as soon as possible. References: - graphql/graphql-over-http#152 - fmg relay-tools/fetch-multipart-graphql#22 - [meros](https://github.com/maraisr/meros)
This removes the need for `Content-Length`, and handles the boundaries such that the next boundary is flushed as soon as possible. References: - graphql/graphql-over-http#152 - fmg relay-tools/fetch-multipart-graphql#22 - [meros](https://github.com/maraisr/meros)
From the graphql/graphql-over-http#152 we no longer need content-length things. This PR aims to parse till a boundary, and yield then.
cc @robrichard