-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
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()); queryBardynamically 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).