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
It's now given a map with :response key populated, but it might be nice if it also had :id, :query, :variables etc as well, this could potentially save the user piping this stuff around if they need it in the callback handler
The text was updated successfully, but these errors were encountered:
Even better, It would be nice if it was able to add any arguments to the callback. Kinda like currying the event
(re-frame/reg-event-db::on-thing
[re-frame/unwrap]
(fn [db [user-id user {:keys [response]}]]
(let [{:keys [data errors]} response]
;; do things with data e.g. write it into the re-frame database
)))
(re-frame/dispatch [::re-graph/subscribe
{:id:my-subscription-id:query"{ things { id } }":variables {:some"variable"}
:callback [::on-thing10 {:username"user":role"admin"}]}])
What do you think? This would unfortunately break the current functionality, but I think it's a nice addition.
It's now given a map with
:response
key populated, but it might be nice if it also had:id
,:query
,:variables
etc as well, this could potentially save the user piping this stuff around if they need it in the callback handlerThe text was updated successfully, but these errors were encountered: