David Pedersen

Results 309 comments of David Pedersen

Well yes of course, if you wanna check multiple headers then you gotta do that. I just didn't do that in my example but the exact same technique works. >...

Ah sorry. I thought you meant compress the response. Decompression should work fine as well. Decompression doesn't do anything unless you actually read the body. It doesn't eagerly decompress it.

Nope the order shouldn't matter. You can also use a tuple of layers ([that's a layer as well](https://docs.rs/tower-layer/latest/tower_layer/trait.Layer.html#impl-Layer%3CS%3E-for-(L1%2C%20L2))) ``` post(json).route_layer((RequestDecompressionLayer::new(), CompressionLayer::new())) ```

You can extract the headers with `axum::http::HeaderMap` and do whatever you need in the handler.

> If you let handlers take care of this, will introspection still be possible to help generators like https://github.com/jakobhellermann/axum_openapi? Support for that could be built into the openapi library. I'm...

Yeah that warning is caused by some generated code. Haven't quite tracked it down yet. Have a hunch it might be coming from juniper itself. In the meantime you can...

I actually think it makes sense to keep this issue open until its been fixed 😊

I've looked into this a bit more and I actually think we're hitting this bug https://github.com/rust-lang/rust/issues/70814. If you replace the call to `graphql_schema_from_file!` with the exact code it expands into...

I don’t think so. You’re welcome to submit a PR!

Yes I agree that would be good but not essential and a PR without is also cool. We can always add that later.