-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Turning off __typename consequences #2881
Comments
Look at how objects are cached, typically the default is See https://www.apollographql.com/docs/react/features/cache-updates.html#normalization Also, watch this for more info: https://www.youtube.com/watch?v=zWhVAN4Tg6M&feature=youtu.be&t=690 |
@rosskevin yep, I checked the store using apollo dev tools. So, if I fetch users with type User:1
User:33 If I turn off ROOT_QUERY.users.1
ROOT_QUERY.users.33 So the question is, are there any cons of this? For example, bad cache performance, duplication, nested types connection problems or smth else if |
The video discusses your question. |
@rosskevin I watched it and got the idea about |
I believe (if I recall) as you have seen that it will index via query instead, so if your query differs then you will have cache misses - this is all from memory as I decided after watching that the |
@rosskevin seems like I'll have to use defaults too and remove |
If you want to avoid having to manually remove |
@ikatun are you still doing this or are you aware of a better practice? |
interested in an update on this |
@pitops what kind of update are you interested in? This issue discusses what it is, why it is there, links to a video, and links to a document describing what and why it exists, and how to take that process into your own hands. |
@rosskevin I am interested if there is a better practice for this, one that the apollo-client supports or will support in the near future. |
We dumped the Internally, it all just comes to this function
and then (for example in render function/method)
|
Hi @ALL, Please check the below thread for this issue. Regards |
Hey, there are a lot of issues about
__typename
added to data. There are use cases when you want to receive data exactly as it was asked. The advised solutions were to manually deeply remove__typename
from data or to turn this off withaddTypename: false
.What are the consequences of turning this off with
addTypename: false
, will it break cache somehow/make it slower/etc ?The text was updated successfully, but these errors were encountered: