smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
160 stars 92 forks source link

Is there a way of changing the max header size limit for dynamic client in http mode? #2215

Closed Vitali-Kazhuro closed 3 weeks ago

Vitali-Kazhuro commented 4 weeks ago

Hi guys!

Is there a way of changing the max header size limit for dynamic client in http mode?

I'm getting responses with headers around 20Kb, and it seems like the http client under the hood is throwing: "io.netty.handler.codec.http.TooLongHttpHeaderException: HTTP header is larger than 8192 bytes."

I've tried to set quarkus.http.limits.max-header-size property, but it doesn't seem to work in this case

jmartisk commented 4 weeks ago

quarkus.http.limits.max-header-size affects the core HTTP server managed by Quarkus and is not translated to usages of HTTP clients.

We don't provide a configuration value for this (yet), but you should be able to use the VertxDynamicGraphQLClientBuilder programmatically to build a client, and it has a options(WebClientOptions) method, and the WebClientOptions has a setMaxHeaderSize method.

Vitali-Kazhuro commented 4 weeks ago

That'll work for me, thanks a lot!