-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(graphcache) - Refactor SelectionIterator and clean up exports (#1060)
* Remove private Graphcache exports In theory these undocumented APIs could be used to write a custom normalized cache based on Graphcache's internal logic. However, we forgot to expose `initDataState` anyway and additionally these APIs were not actually in use by anyone. So for now we'll remove them. * Simplify getFragments utility in traversal helpers * Reduce iteration cost of SelectionIterator - Replace object with just an iterate function - Reduce cost of iteration by adding recursive iterators * Add changeset
- Loading branch information
Showing
6 changed files
with
78 additions
and
71 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 | ||
--- | ||
|
||
Changes some internals of how selections are iterated over and remove some private exports. This will have no effect or fixes on how Graphcache functions, but may improve some minor performance characteristics of large queries. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from './types'; | ||
export { query, write, writeOptimistic } from './operations'; | ||
export { Store, noopDataState, reserveLayer } from './store'; | ||
export { query, write } from './operations'; | ||
export { Store } from './store'; | ||
export { cacheExchange } from './cacheExchange'; | ||
export { offlineExchange } from './offlineExchange'; |
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