-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receiving bad :dispatch value #101
Comments
Hi, What version of re-graph and re-frame are you using? Cheers |
Here is how I am importing both: re-frame/re-frame {:mvn/version "1.4.3"}
re-graph/re-graph {:mvn/version "0.2.0" :exclusions [re-graph.hato/re-graph.hato]} Thank you! |
Thanks, I've looked into this a bit but not found anything yet. One thing I can try is to update re-frame on re-graph and run the tests to see if something changed in re-frame. Are you using websockets or http to talk to the server? Thanks |
Hi, Are you sure you don't have a bad event handler that is wiping out the db? re-graph registers the callback against the query id, in order to dispatch it when it receives a response. If it got wiped out you'd probably see the error you get here, and that might also explain how it could be intermittent. I upgraded most of the deps and all the tests still pass, so I don't think it's that. Cheers |
Hi, I reviewed my code several times. With your suggestion in mind, I noticed a point of improvement. Which was returning an empty map of effects in my callback event. Before: (defn my-callback
"a callback"
[_ _]) Now: (defn my-callback
"a callback"
[_ _]
{}) But the error continues to occur in this version. I can not see how this can wip out the db in this case, since my callback event has no effects in it. Thanks |
I am using re-graph to both mutate and query and I am facing an intermittent error in production. Here is an example:
Here is a code similar to my application:
I noticed that in some points of the re-graph code there are updates that could result in that error, like in here:
Looking at this I can imagine why passing no callback raises the error, since
(update nil 1 assoc :response {})
is{1 {:response {}}}
. But I can not see how passing a callback can result in this. Also, it would be very useful to be able to omit the callback function in some cases.The text was updated successfully, but these errors were encountered: