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
Currently the problem we have is that if we populate a list by making a query and including relationships, if somewhere else on the screen you may make a different call with different requested relationships, the top level entity is updated with the new relationship. So if your original query populated a table, for example, and accessed those relationships, things break down because now one entity in that list no longer has the relationships it originally had.
To simplify lets say you make a call to get posts with comments included. So you end up with
Get all posts with comments
entities
post 1
comments array
post 2
comments array
post 3
comments array
But on the same screen perhaps post 2 gets update via another query with a different requested shape like
Get a single individual post with author
So now your top level entities has:
entities
post 1
comments array
post 2
author
post 3
comments array
So the table that was originally populated with posts and something related to comments will break because suddenly comments disappear from one of those top level posts.
The text was updated successfully, but these errors were encountered:
I think you would either update your endpoints so that both include comments, or you would expose them as different types (e.g. short_posts and full_posts) so they don't collide with each other.
Currently the problem we have is that if we populate a list by making a query and including relationships, if somewhere else on the screen you may make a different call with different requested relationships, the top level entity is updated with the new relationship. So if your original query populated a table, for example, and accessed those relationships, things break down because now one entity in that list no longer has the relationships it originally had.
To simplify lets say you make a call to get posts with comments included. So you end up with
Get all posts with comments
entities
But on the same screen perhaps post 2 gets update via another query with a different requested shape like
Get a single individual post with author
So now your top level entities has:
entities
comments array
So the table that was originally populated with posts and something related to comments will break because suddenly comments disappear from one of those top level posts.
The text was updated successfully, but these errors were encountered: