-
Notifications
You must be signed in to change notification settings - Fork 2
feat(router): Advanced Header Management #438
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
base: main
Are you sure you want to change the base?
Conversation
✅
|
🐋 This PR was built and pushed to the following Docker images: Image Names: Platforms: Image Tags: Docker metadata{
"buildx.build.ref": "builder-240a2b89-08b2-406f-ba9b-0d456c189106/builder-240a2b89-08b2-406f-ba9b-0d456c1891060/koso7sni52haxum0ztsreji9l",
"containerimage.descriptor": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:54c5ca3ed3ecb7826a643a61abb7f67c631f2694b91274b0c393b803ce323580",
"size": 1609
},
"containerimage.digest": "sha256:54c5ca3ed3ecb7826a643a61abb7f67c631f2694b91274b0c393b803ce323580",
"image.name": "ghcr.io/graphql-hive/router:pr-438,ghcr.io/graphql-hive/router:sha-d2345c7"
} |
a5fef19
to
0888ec2
Compare
This comment was marked as outdated.
This comment was marked as outdated.
450983a
to
6e1fb0a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8ce8ab8
to
b4b372a
Compare
/gemini review |
Hello @kamilkisiela, I received your commands Overall ImpressionThis pull request introduces a significant and well-designed feature for advanced header management within the router. The approach of compiling header rules into an immutable plan and then applying them at runtime is robust and efficient. The use of VRL expressions for dynamic header values adds a powerful layer of flexibility, and the clear separation of concerns into dedicated modules for compilation, planning, and application is excellent for maintainability. The comprehensive documentation for the new configuration is also a major plus. Review based on criteria:Correctness
Efficiency
Maintainability
Security
SummaryThis pull request delivers a robust and highly configurable header management system. By introducing a clear |
Implements #318
This is the flow the PR introduces:
Config
getsCompiled
into aPlan
that isApplied
when needed (when request occurs).In the compilation step, we validate the config and produce an immutable plan.
Regexes are combined and compiled to have the matching more efficient.
In this step, we also produce a list of header manipulation operations, in order of their definition in the config.
The response headers are collected after every subgraph response. We don't hold them forever, we only keep the relevant ones, by aggregating them response by response.
Release note
Advanced Header Management: You can now declaratively control HTTP headers for both subgraph requests and client responses. The new
headers
configuration allows for fine-grained manipulation, including:first
,last
, orappend
strategies.