-
-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(graphcache) - Reduce overall bundle-size (#611)
* Replace invalidate operation with shim based on query Instead of fully traversing a query to invalidate its data, we now use the query operation to recursively invalidate all entities associated with the query instead. This does a little more than before, but shouldn't break any apps. * Share Context type and creation in operations * Share context updater for info/context field in resolvers * Merge readSelection and readResolverResult * Combine writeRootField and writeField * Simplify shouldInclude implementation * Refactor variables helpers * Delete dead code in node helpers * Refactor minor quirks in schemaPredicates helpers * Simplify Store constructor and remove Store#gc * Simplify cache execution in cacheExchange * Remove GC suite from benchmark * Add ANALYZE env option to Rollup config * Remove redundant code from data.ts * Remove non-cacheExchange exports * Remove dead inline function in cacheExchange * Readd exports * remove writeFragment, initDataState, clearDataState, getCurrentDependencies and clearLayer from the root exports. Make cacheExchange a bit more readable * remove the read export * golf a few bytes by making the value undefined in writeLink and writeRecord * moving writeRoot to writeSelection * Fix writeSelection with merged withRoot code * Fix key condition in writeSelection * Simplify refactored writeSelection * Remove store.getRootKey * Remove custom iteration from writeOptimistic * Fix lint errors * Add changeset Co-authored-by: Jovi De Croock <[email protected]>
- Loading branch information
1 parent
64d4664
commit 42657ba
Showing
21 changed files
with
404 additions
and
730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@urql/exchange-graphcache': patch | ||
--- | ||
|
||
Refactor parts of Graphcache for a minor performance boost and bundlesize reductions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.