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

Implement Content-Encoding aware query decompression support #995

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

SadiinsoSnowfall
Copy link
Contributor

@SadiinsoSnowfall SadiinsoSnowfall commented Jul 26, 2022

This PR implements Content-Encoding aware decompression support for incoming GQL queries. This can be useful when dealing with large queries that compress well. This add supports for gzip, deflate, brotli and zstd compression algorithms under the new feature "compression".

Actix-web has similar features to allow the decompression of incoming requests based on the content-encoding header.

Fixes #879.

@sunli829
Copy link
Collaborator

Thanks a lot for the PR, just this should be implemented by web framework? 😂

@SadiinsoSnowfall
Copy link
Contributor Author

This is indeed already implemented by some web frameworks (such as Actix-web) but async-graphql bypasses this mechanism because it works on raw requests.

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.

Take the content-encoding header into account when parsing a query
2 participants