-
Notifications
You must be signed in to change notification settings - Fork 3
fix: support @include and @skip in initial fetch node
#591
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
Conversation
Summary of ChangesHello @kamilkisiela, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical bug in the query planner where GraphQL's Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Corrects the indentation of fragment spreads in pretty printing.
85cd62a to
b8579cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly fixes an issue where @skip and @include directives were being dropped from the initial fetch node. The introduction of a self-referencing Selfie edge is a clever approach to handle conditional inline fragments on the same type. The changes are well-tested with new snapshot tests covering various scenarios.
I have a few suggestions to improve the code further, mainly around logging, naming, and function signatures to enhance clarity and maintainability, in line with the repository's style guide.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Removed debug print statement for path finding failure.
✅
|
|
🐋 This PR was built and pushed to the following Docker images: Image Names: Platforms: Image Tags: Docker metadata{
"buildx.build.ref": "builder-54695a15-92e0-47c8-984d-a7842c325407/builder-54695a15-92e0-47c8-984d-a7842c3254070/qpfoxwchelo2kh2gn4evfqbm0",
"containerimage.descriptor": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:4430a9644d2c36b9eb39fb27b4396d45a3753e819e77dc1d83417d9b52cca12e",
"size": 1609
},
"containerimage.digest": "sha256:4430a9644d2c36b9eb39fb27b4396d45a3753e819e77dc1d83417d9b52cca12e",
"image.name": "ghcr.io/graphql-hive/router:pr-591,ghcr.io/graphql-hive/router:sha-77f82e1"
} |
> [!IMPORTANT] > Merging this pull request will create these releases # router 0.0.21 (2025-11-28) ## Features - Subgraph Timeout Configuration (#541) ### Subgraph Request Timeout Feature Adds support for configurable subgraph request timeouts via the `traffic_shaping` configuration. The `request_timeout` option allows you to specify the maximum time the router will wait for a response from a subgraph before timing out the request. You can set a static timeout (e.g., `30s`) globally or per-subgraph, or use dynamic timeouts with VRL expressions to vary timeout values based on request characteristics. This helps protect your router from hanging requests and enables fine-grained control over how long requests to different subgraphs should be allowed to run. ### Rename `original_url` variable to `default` in subgraph URL override expressions. This change aligns the variable naming with other configuration expressions, such as timeout configuration. When using expressions to override subgraph URLs, use `.default` to refer to the original URL defined in the subgraph definition. Example: ```yaml url: expression: | if .request.headers."x-region" == "us-east" { "https://products-us-east.example.com/graphql" } else { .default } ``` ## Fixes - support `@include` and `@skip` in initial fetch node (#591) - Fixed an issue where `@skip` and `@include` directives were incorrectly removed from the initial Fetch of the Query Plan. # node-addon 0.0.5 (2025-11-28) ## Fixes - support `@include` and `@skip` in initial fetch node (#591) - Fixed an issue where `@skip` and `@include` directives were incorrectly removed from the initial Fetch of the Query Plan. # query-planner 2.1.1 (2025-11-28) ## Fixes - support `@include` and `@skip` in initial fetch node (#591) - Fixed an issue where `@skip` and `@include` directives were incorrectly removed from the initial Fetch of the Query Plan. # config 0.0.13 (2025-11-28) ## Features ### Subgraph Request Timeout Feature Adds support for configurable subgraph request timeouts via the `traffic_shaping` configuration. The `request_timeout` option allows you to specify the maximum time the router will wait for a response from a subgraph before timing out the request. You can set a static timeout (e.g., `30s`) globally or per-subgraph, or use dynamic timeouts with VRL expressions to vary timeout values based on request characteristics. This helps protect your router from hanging requests and enables fine-grained control over how long requests to different subgraphs should be allowed to run. ### Rename `original_url` variable to `default` in subgraph URL override expressions. This change aligns the variable naming with other configuration expressions, such as timeout configuration. When using expressions to override subgraph URLs, use `.default` to refer to the original URL defined in the subgraph definition. Example: ```yaml url: expression: | if .request.headers."x-region" == "us-east" { "https://products-us-east.example.com/graphql" } else { .default } ``` ## Fixes - support `@include` and `@skip` in initial fetch node (#591) # executor 6.2.0 (2025-11-28) ## Features ### Subgraph Request Timeout Feature Adds support for configurable subgraph request timeouts via the `traffic_shaping` configuration. The `request_timeout` option allows you to specify the maximum time the router will wait for a response from a subgraph before timing out the request. You can set a static timeout (e.g., `30s`) globally or per-subgraph, or use dynamic timeouts with VRL expressions to vary timeout values based on request characteristics. This helps protect your router from hanging requests and enables fine-grained control over how long requests to different subgraphs should be allowed to run. ### Rename `original_url` variable to `default` in subgraph URL override expressions. This change aligns the variable naming with other configuration expressions, such as timeout configuration. When using expressions to override subgraph URLs, use `.default` to refer to the original URL defined in the subgraph definition. Example: ```yaml url: expression: | if .request.headers."x-region" == "us-east" { "https://products-us-east.example.com/graphql" } else { .default } ``` ## Fixes - support `@include` and `@skip` in initial fetch node (#591) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Fixed an issue where
@skipand@includedirectives were incorrectly removed from the initial Fetch of the Query Plan.References #579