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

unify algorithms for masking and migration #12139

Merged
merged 25 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
654d788
alternative implementation without object recreation.
phryneas Nov 15, 2024
0418722
move assignment around
phryneas Nov 18, 2024
9c5210c
down to two failing tests...
phryneas Nov 18, 2024
78ff749
all green
phryneas Nov 18, 2024
bdc3e24
uncomment
phryneas Nov 18, 2024
54b8344
Reenable all tests
jerelmiller Nov 18, 2024
e38adb8
Fix incorrect test name
jerelmiller Nov 18, 2024
b16079b
Remove fragment sorting
jerelmiller Nov 18, 2024
cf87e13
Remove unneeded comment
jerelmiller Nov 18, 2024
f015645
Remove unused import
jerelmiller Nov 19, 2024
f4d2cc8
Guard against undefined data
jerelmiller Nov 19, 2024
6f5ce4f
Ensure console mocks are cleared between checks
jerelmiller Nov 19, 2024
9c2b770
Tweak test to check which fields warned
jerelmiller Nov 19, 2024
ad2e2e6
Add additional check for fields
jerelmiller Nov 19, 2024
d0c33d0
use a loop instead of reduce
phryneas Nov 19, 2024
80fe2e5
fix last test
phryneas Nov 19, 2024
04020e5
property accessor memory optimizations
phryneas Nov 19, 2024
37e9086
use WeakMap/WeakSet where possible
phryneas Nov 19, 2024
daaa902
update size limits
phryneas Nov 19, 2024
c166f45
inline accessor warnings
phryneas Nov 19, 2024
158031d
add additional test
phryneas Nov 19, 2024
104c86e
Swap order of arguments
jerelmiller Nov 19, 2024
ada2dee
Swap order of arguments on getAccessorWarningDescriptor
jerelmiller Nov 19, 2024
9259df3
Clean up Prettier, Size-limit, and Api-Extractor
jerelmiller Nov 19, 2024
dd9004f
Add changesets
jerelmiller Nov 19, 2024
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
5 changes: 5 additions & 0 deletions .changeset/itchy-penguins-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Fix issue where masked data would sometimes get returned when the field was part of a child fragment from a fragment unmasked by the parent query.
5 changes: 5 additions & 0 deletions .changeset/mean-bottles-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Fix issue where the warning emitted by `@unmask(mode: "migrate")` would trigger unnecessarily when the fragment was used alongside a masked fragment inside an inline fragment.
5 changes: 5 additions & 0 deletions .changeset/wicked-pans-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Fix issue that threw errors when masking partial data with `@unmask(mode: "migrate")`.
4 changes: 2 additions & 2 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 41638,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 34394
"dist/apollo-client.min.cjs": 41756,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 34505
}
Loading