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
When traversing from a root node through a field edge, updates to the field edge do not correctly update the reactive query.
foo.queryBar().genLive()
foo.update({
barId: newId
});
new bars won't be received as barId is encoded by value in the query.
Few options:
live queries rely on a "query provider" function that is re-run to regenerate the query and re-capture variables
This means the live query api must change quite a bit. To something like:
makeLive(() => foo.queryBar());
queryBar dynamically binds the barId in the query... So when it is re-run it is reading the latest barId from foo. This works but vastly changes the semantics of queries and maybe makes the unpredictable? If anyone ever saves a query then its results could change depending on when it is invoked... Queries are thus no longer immutable either. A query's behavior could change due to random other pieces of code mucking with unrelated objects.
Option (1) sounds like the right path. Too much spooky action at a distance in option (2).
The text was updated successfully, but these errors were encountered:
When traversing from a root node through a field edge, updates to the field edge do not correctly update the reactive query.
new bars won't be received as
barId
is encoded by value in the query.Few options:
This means the live query api must change quite a bit. To something like:
makeLive(() => foo.queryBar());
queryBar
dynamically binds the barId in the query... So when it is re-run it is reading the latest barId from foo. This works but vastly changes the semantics of queries and maybe makes the unpredictable? If anyone ever saves a query then its results could change depending on when it is invoked... Queries are thus no longer immutable either. A query's behavior could change due to random other pieces of code mucking with unrelated objects.Option (1) sounds like the right path. Too much spooky action at a distance in option (2).
The text was updated successfully, but these errors were encountered: