From 4e353cb30b498e096e90b4bd766253edfdfc06d3 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 3 Nov 2023 15:07:49 +0100 Subject: [PATCH] Changelog for PR #4038: Port to apollo-compiler 1.0 beta (#4136) --- **Checklist** Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review. - [x] Changes are compatible[^1] - [x] Documentation[^2] completed - [x] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **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. --- .changesets/fix_simon_compiler_1_0.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changesets/fix_simon_compiler_1_0.md diff --git a/.changesets/fix_simon_compiler_1_0.md b/.changesets/fix_simon_compiler_1_0.md new file mode 100644 index 0000000000..7397017f43 --- /dev/null +++ b/.changesets/fix_simon_compiler_1_0.md @@ -0,0 +1,13 @@ +### Port to apollo-compiler 1.0 beta ([PR #4038](https://github.com/apollographql/router/pull/4038)) + +Version 1.0 is a near-complete rewrite of `apollo-compiler`. +Using it in the Router unblocks a lot of upcoming work. + +As a more immediate benefit, some serialization-related bugs including +[Issue #3541](https://github.com/apollographql/router/issues/3541) are fixed. +The representation of GraphQL documents in previous compiler versions was immutable. +When modifying a query (such as to remove `@authenticated` fields from an unauthenticated request) +the Router would build a new data structure with `apollo-encoder`, serialize it, and reparse it. +`apollo-compiler`` 1.0 allows mutating a document in-place, skipping the serialization step entirely. + +By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/4038