Skip to content
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

Parse & cache queries #205

Merged
merged 23 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5a23f14
Move Query to its own file
cecton Nov 26, 2021
46ece7d
Move query parsing to object creation
cecton Nov 26, 2021
40b12af
Remove unnecessary derives
cecton Nov 26, 2021
fad02c6
Convert ast::Selection to Selection
cecton Nov 26, 2021
8e913b1
Convert ast::OperationDefinition to Operation
cecton Nov 26, 2021
0e01fd4
Update apply_selection_set
cecton Nov 26, 2021
86f6cb0
Do the parsing in a blocking thread
cecton Nov 26, 2021
2309801
Return parsing errors
cecton Nov 26, 2021
78d6196
Shamelessly copy-pasting caching from query planner
cecton Nov 26, 2021
dd9a175
Use the query cache & remove feat post-processing
cecton Nov 26, 2021
b38d4b5
Fix wrong logic for parallel tasks
cecton Nov 26, 2021
07a9b0e
Fix tests... omg I regret not having refactored prior
cecton Nov 26, 2021
2f7fcd4
clippy fixes
cecton Nov 26, 2021
722de30
Prepend schema's fragments to parsed query
cecton Nov 26, 2021
3090776
Apply all operation selections
cecton Nov 26, 2021
a1b5430
Apply selection set only if operation name matches
cecton Nov 26, 2021
54b3bf5
Fix and add tests
cecton Nov 26, 2021
c4064ee
Add doc
cecton Nov 26, 2021
7baf9b1
Merge commit ce5ea54a0f002020d65db886016010684aab2e57 (conflicts)
cecton Nov 26, 2021
bb74f70
Merge commit 9415cb7bd95cef07f4b531f83958a843ee006853 (no conflict)
cecton Nov 26, 2021
228a4fb
Merge remote-tracking branch 'origin/main' into cecton-caching-queries
cecton Nov 26, 2021
44fdb3c
Remove blocking future from return value of query parsing
cecton Nov 29, 2021
33e03a6
Remove unnecessary pub(crate)'s
cecton Nov 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apollo-router-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "LicenseRef-ELv2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dev-dependencies]
apollo-router = { path = "../apollo-router", features = ["post-processing"] }
apollo-router = { path = "../apollo-router" }
apollo-router-core = { path = "../apollo-router-core" }
criterion = { version = "0.3", features = ["async_tokio", "async_futures"] }
futures = "0.3.18"
Expand Down
4 changes: 4 additions & 0 deletions apollo-router-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ macro_rules! failfast_error {
mod error;
mod json_ext;
mod naive_introspection;
mod query;
mod query_cache;
mod query_planner;
mod request;
mod response;
Expand All @@ -34,6 +36,8 @@ mod traits;
pub use error::*;
pub use json_ext::*;
pub use naive_introspection::*;
pub use query::*;
pub use query_cache::*;
pub use query_planner::*;
pub use request::*;
pub use response::*;
Expand Down
Loading