Comments (4)
The point of the "cache" of executeSubSelectedArrays
is not necessarily the output of an empty array, but the mapping of the input to the output:
"If for this field of this parent entitity, I make a specific query selection on it's array children, what do I get back?"
You shouldn't be concerned that this cache holds 22k elements, and most of them empty arrays. It's still valuable information, as in these 15k "extra" cases, all of them come "from different inputs".
It just means that the next time this result is requested from the cache, you don't have to execute 22k functions instead - it's a performance optimization.
from apollo-client.
That said, we could get around this for the specific case of empty arrays, but it has some tradeoffs.
I opened #11670, but am not sure if it's actually worth it following through - see potential discussion there.
from apollo-client.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
from apollo-client.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
from apollo-client.
Related Issues (20)
- AutoCleanedWeakCache causes failure when running tests in fakeAsync zone HOT 4
- useQuery fails to resolve ssr renderPromise due to JSON.stringify reordering HOT 6
- useSuspenseQuery returns an error instead of throwing an exception HOT 6
- Initializing ApolloClient before DataDog RUM causes GraphQL calls to not have the correct headers HOT 5
- Skipped Query returns outdated data after cache clearing HOT 7
- Merge function at the type level not working (+ suggested fix) HOT 13
- Unexpected Data Fetching with `useBackgroundQuery`, StrictMode, `fetchPolicy`: `network-only` (or `no-cache`), and state changes HOT 6
- When use the Apollo Client server side rendering, How to share the cache in cluster server (k8s)? ( did we have file cache? or db cache? ) HOT 3
- Feedback for schema-driven testing utilities HOT 1
- Add `subscribeToMore` functionality to `useQueryRefHandlers`, `useBackgroundQuery`
- [Docs] Anchor links seem to be stripped HOT 4
- Incomprehensible type mismatch with query generics HOT 3
- Changes to `context` cause refetches in `useQuery` HOT 11
- Add an option in ApolloClient constructor to return a deep copy of query results (or a way to globally transform results after the caching step) HOT 2
- Potentially unintentionally large AoE breaking changing to typescript `MockedResponse` in type 3.9 HOT 4
- clearStore causes a crash when there is an active query HOT 3
- Getting A on the result.data HOT 2
- BatchHTTPLink is not monitoring friendly HOT 6
- Support extensions in useSubscription HOT 1
- React functionality 'useContext' is not available in this environment [Nextjs app] HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-client.