Extract @cost and @listSize to query planner's subgraph schemas#5707
Extract @cost and @listSize to query planner's subgraph schemas#5707tninesling merged 14 commits intodevfrom
Conversation
…t to propagate the directives
|
@tninesling, please consider creating a changeset entry in |
|
CI performance tests
|
apollo-federation/src/query_graph/extract_subgraphs_from_supergraph.rs
Outdated
Show resolved
Hide resolved
lrlna
left a comment
There was a problem hiding this comment.
This is looking good! Thank you for making sure it's right away added to the rust implementation!
The only change I'd like to ask for is adding Object and Scalar types with @cost to the two tests you've got here. Otherwise a few clarification comments/questions.
|
I am away this next week and don’t want to block you from merging this. The only thing that's important before merging is using the Object Type Definition and the Scalar Type Definiton with |
Thanks, Iryna. This was a great catch, and made me realize I need an equivalent patch for the JS version |
…n with some macros
This PR follows up on apollographql/federation#3074, which defined the new
@costand@listSizedirectives. These will be used by the demand control plugin to score the cost of operations. In the scoring algorithm, the plugin scores FetchNodes in the query plan based on their respective subgraph schemas. This means those extracted subgraph schemas must include these directives, which are copied over from the supergraph.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. ↩