You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our documentation for dataIDFromObject We specify this function will be deprecated soon we haven't decide on when to officially remove this functionality which has lead to some questions from our community.
History
We think type policies are a safer way to customize cache keys, as outlined in the last few bullet points of our Customizing identifier generation globally docs. The common dataIdFromObject approach is:
Sensitive to aliasing mistakes
Usually fails to protect against undefined object properties
Makes it easy to accidentally use different key fields at different times leading to cache inconsistencies
Therefore it has marked as deprecated for a while.
Decision
We have decided to not deprecate this functionality as:
dataIdFromObject still provides an essential service of identifying objects whose type policies don't have keyFields configured, as a sort of catch-all or backstop for the cache identification system.
dataIdFromObject plays a role in how we implement our default support for id-based identification: defaultDataIdFromObject.
So we want to update our documentation accordingly.
The text was updated successfully, but these errors were encountered:
@jpvajda That may all be true, but dataIdFromObject still provides an essential service of identifying objects whose type policies don't have keyFields configured, as a sort of catch-all or backstop for the cache identification system.
In fact, dataIdFromObject plays a role in how we implement our default support for id-based identification: defaultDataIdFromObject.
In other words, I think this issue gets it backwards: we need to remove language about the "deprecation" of dataIdFromObject from our documentation, and not continue with the deprecation at all.
jpvajda
changed the title
Actually deprecate dataIdFromObject from AC v3
Remove deprecated language from dataIdFromObjectJun 13, 2022
Related Issues
#9799
apollographql/apollo-feature-requests#363
Issue
In our documentation for dataIDFromObject We specify this function will be deprecated soon we haven't decide on when to officially remove this functionality which has lead to some questions from our community.
History
We think type policies are a safer way to customize cache keys, as outlined in the last few bullet points of our Customizing identifier generation globally docs. The common
dataIdFromObject
approach is:Therefore it has marked as deprecated for a while.
Decision
We have decided to not deprecate this functionality as:
dataIdFromObject
still provides an essential service of identifying objects whose type policies don't have keyFields configured, as a sort of catch-all or backstop for the cache identification system.dataIdFromObject
plays a role in how we implement our default support for id-based identification: defaultDataIdFromObject.So we want to update our documentation accordingly.
The text was updated successfully, but these errors were encountered: