profusion / sgqlc

Simple GraphQL Client
https://sgqlc.readthedocs.io/
ISC License
506 stars 85 forks source link

HTTP endpoint class should allow compression of the data using gzip #204

Open asipras opened 2 years ago

asipras commented 2 years ago

This is not an issue but an enhancement request/proposal.

Currently Http end point class does not allow any method which we can use to compress data. Compression is helpful when you want to post Mutation data which is quite big.

One solution is to check whether the headers contains Content-Encoding: gzip and if does then compress data using gzip library.

barbieri commented 2 years ago

hi @asipras, while the idea is valid, I think it's out of scope of this project and standard endpoints. Of course, if you want to implement an alternative endpoint or add a flag to the constructor to support this, you're welcome, but I don't have time to work on such feature.