router
router copied to clipboard
FED-191: [Operation Processing] port `operation.optimize`
implemented the rest of Operation::optimize method
https://apollographql.atlassian.net/browse/FED-191
Depends on:
- https://github.com/apollographql/router/pull/5195
- https://github.com/apollographql/router/pull/5200
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
- [x] Changes are compatible[^1]
- [ ] Documentation[^2] completed
- [ ] Performance impact assessed and acceptable
- Tests added and passing[^3]
- [x] Unit Tests
- [ ] Integration Tests
- [ ] Manual Tests
Exceptions
Have a few simple tests. More tests shall be done by poring existing federation tests.
Notes
[^1]: 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. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.
@duckki, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.
I ported a few tests. That detected a bug in optimization and in a few other places. I'd like to merge this PR and hunt the rest (if any) together as we port tests.
There are some snapshot tests changes, and the new changes produced by these snapshots genuinely look incorrect - spacing for fragment definitions looks off 🤔
I fixed the spacing issue and a bug in reuse_query_fragments option handling.
I reviewed the status of failing tests and annotated appropriately (some improved and some failed showing different symptoms).
I think it's ok to merge into dev.