Conversation
|
@lennyburdette, please consider creating a changeset entry in |
|
CI performance tests
|
fa13cd4 to
2858152
Compare
…deration's Connector (#5423)
This is really good to call out – do we inventory this somewhere? |
Geal
left a comment
There was a problem hiding this comment.
I have only reviewed the parts where the connectors interact with existing router functionality, I'll dig into the connectors plugin itself later.
It's good overall, there's a few things that will need attention, but they're not blockers
apollo-router/Cargo.toml
Outdated
| fred = { version = "7.1.2", features = ["enable-rustls", "mocks"] } | ||
| futures-test = "0.3.30" | ||
| insta.workspace = true | ||
| json_value_merge = "2.0.0" |
There was a problem hiding this comment.
we already have internal code for this https://github.com/apollographql/router/blob/dev/apollo-router/src/json_ext.rs#L68-L96
At this point we should be careful about adding any new dependencies, because compilations is already too heavy
|
|
||
| # See note above in this file about `^tracing` packages which also applies to | ||
| # these dev dependencies. | ||
| tracing-fluent-assertions = "0.3.0" |
There was a problem hiding this comment.
we already use at least 2 other crates to test tracing and spans, is this one really needed?
apollo-router/src/plugin/mod.rs
Outdated
| }; | ||
| }; | ||
|
|
||
| ($group: literal, $name: ident, $plugin_type: ident) => { |
There was a problem hiding this comment.
NIT: instead of 2 different declarations with ident and literal, we should have only one with expr
| .supergraph_request(parameters.supergraph_request.clone()) | ||
| .variables(variables) | ||
| .current_dir(current_dir.clone()) | ||
| .deferred_fetches(parameters.deferred_fetches.clone()) |
There was a problem hiding this comment.
this clone will cause performance issues. The ExecutionParameters structure that uses references everywhere was introduced to avoid the clones during execution, which became expensive.
The only reason deferred_fetches is used in FetchNode::fetch_node is this:
router/apollo-router/src/query_planner/fetch.rs
Lines 522 to 529 in d940c3f
That should be moved right here in execution.rs
| pub(crate) fn response_at_path<'a>( | ||
| schema: &Schema, | ||
| current_dir: &'a Path, | ||
| inverted_paths: Vec<Vec<Path>>, | ||
| response: graphql::Response, | ||
| requires: &[Selection], | ||
| output_rewrites: &Option<Vec<DataRewrite>>, | ||
| service_name: &str, |
| .and_connection_closed_signal(parameters.subscription_handle.as_ref().map(|s| s.closed_signal.resubscribe())) | ||
| .build(); | ||
|
|
||
| // TODO[igni]: refactor so it uses fetchservice |
There was a problem hiding this comment.
please open an issue to follow up on this?
There was a problem hiding this comment.
i've filed issues for all comments on this PR, thank you!
| .create(service_name) | ||
| .expect("we already checked that the service exists during planning; qed"); | ||
| .subgraph_service_for_subscriptions(service_name) | ||
| .unwrap(); |
| @@ -0,0 +1,54 @@ | |||
| #![allow(missing_docs)] // FIXME | |||
| let join_directive = value | ||
| .directives | ||
| .iter() | ||
| .find(|directive| directive.name.eq_ignore_ascii_case("join__graph"))?; |
There was a problem hiding this comment.
does the directive name need to be case insensitive?
done in #5720 |
dylan-apollo
left a comment
There was a problem hiding this comment.
I'm ready when you are ![]()
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩