-
Notifications
You must be signed in to change notification settings - Fork 272
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
Enable generate_query_fragments
by default
#6013
Merged
Merged
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
be83e30
Enable `generate_query_fragments` by default
lrlna ee0975d
update config snapshot
lrlna cd3c249
Update docs/source/configuration/overview.mdx
lrlna 1daae5d
use unwrap_or_else for generate_query_fragments defaults
lrlna 51e89cb
update redis cache keys
lrlna 6f43f20
new changelog
goto-bus-stop a6035eb
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop e807ff6
explain experimental/legacy state of fragment reuse in docs; do not s…
goto-bus-stop f1f45a7
keep links to the old header name working
goto-bus-stop 0c40214
Update mocks: migrate some to fragment generation, disable fragment g…
goto-bus-stop 544ce20
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop f5e1898
Update more mocks to use frag generation
goto-bus-stop b395dcc
Update at least one type conditioned fetching mock
goto-bus-stop 592c45c
Fix redis tests
goto-bus-stop c51d105
Disable fragment generation for setContext integration tests
goto-bus-stop e638565
fix type condition test mocks
goto-bus-stop 820977e
Update expectations in entity cache invalidation test
goto-bus-stop d2379fe
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop c734f9b
update mock for entity-cache + defer test
goto-bus-stop bc2ae12
update redis keys
goto-bus-stop eef215d
update core/defer mock
goto-bus-stop bf90de4
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop 236fba6
Also swap the defaults inside apollo-federation
goto-bus-stop c3c86ac
Revert "Also swap the defaults inside apollo-federation"
goto-bus-stop 2e235a8
Disable reuse fragments by default inside apollo-federation
goto-bus-stop e4190e1
linting once again
goto-bus-stop 45fb226
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop c571242
update mock in benchmarks test
goto-bus-stop cb539c2
Merge branch 'dev' into lrlna/enable-generate-fragments
goto-bus-stop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.changesets/feat_lrlna_enable_generate_query_fragments_by_default.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
### Compress subgraph operations by generating fragments | ||
|
||
The router now compresses operations sent to subgraphs by default by generating fragment | ||
definitions and using them in the operation. | ||
|
||
Initially, the router is using a very simple transformation that is implemented in both | ||
the JavaScript and Native query planners. We will improve the algorithm after the JavaScript | ||
planner is no longer supported. | ||
|
||
This replaces a previous experimental algorithm that was enabled by default. | ||
`experimental_reuse_query_fragments` attempted to intelligently reuse the fragment definitions | ||
from the original operation. Fragment generation is much faster, and in most cases produces | ||
better outputs too. | ||
|
||
If you are relying on the shape of fragments in your subgraph operations or tests, you can opt | ||
out of the new algorithm with the configuration below. Note we strongly recommend against | ||
relying on the shape of planned operations as new router features and optimizations may affect | ||
it, and we intend to remove `experimental_reuse_query_fragments` in a future release. | ||
|
||
```yaml | ||
supergraph: | ||
generate_query_fragments: false | ||
experimental_reuse_query_fragments: true | ||
``` | ||
|
||
By [@lrlna](https://github.com/lrlna) in https://github.com/apollographql/router/pull/6013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should this be linking to a new issue (6013 is the existing PR#)?
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.
The work would likely be done as part of removing
reuse_query_fragments
, I linked the PR as a place where you can find context