Closed timgilbert closed 3 years ago
Hi,
Thank you for this. This is a bug so I will fix it but this will help people in the meantime! It also allows query cancellation which you can't do without an ID.
Awesome, thanks @oliyh! I also hit a seemingly related bug where I was getting this error about not being able to find a valid instance - even when I pass in a name I get Valid instance names are:" nil "but was provided with" nil
.
It's reproducible in my codebase but I'm having trouble narrowing it down to a test case - once I do I'll file an issue.
(Just to follow up on that last comment, I discovered that a bug in my own code was accidentally nuking the entire :re-graph
key out of the application db, so the "valid instance names" bit was due to my own errors, not anything to do with re-graph.)
It looks like there's some code in
re-graph.internals
which is meant to make thequery-id
parameter to the::re-graph/query
event optional, but when I tried this out (in ClojureScript) I got console errors when I didn't include the parameter ("Uncaught TypeError: s.replace is not a function" coming up from the depth of re-frame). The code I was running was:This worked fine:
Possibly there's some kind of bug in the library, but anyways this PR just updates the README to reflect the usage that is working correctly.