Comments (1)
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-thing 10 {:username "user" :role "admin"}]}])
What do you think? This would unfortunately break the current functionality, but I think it's a nice addition.
from re-graph.
Related Issues (20)
- Custom payload for queries, mutations and subscriptions
- Error when no argument map is wrote HOT 1
- HTTP library parameters should be adjustable
- hangs in clojure HOT 5
- Incompatible with re-frame 1.1.2 HOT 7
- Fix queries without ID in cljs (see #77) HOT 4
- How do I set Headers for each individual subscriptions? HOT 3
- Add section on authentication to readme HOT 4
- Support re-frame unwrap and in turn use event maps for mutations/subscriptions HOT 3
- Clojurescript 1.10.844 support HOT 7
- Is is supposed to be working on react native? HOT 3
- Re-graph logger causes: "TypeError: Cannot read properties of undefined (reading 'Level')" HOT 4
- No default instance of re-graph found but no valid instance name was provided. HOT 4
- Lean on re-frame logging instead of custom?
- `impl` should be given the re-graph state and the event being handled if it's a function
- Websocket messages get dropped/ignored when last? is true HOT 1
- Reconnect/destroy not working for clj websocket subscriptions HOT 6
- fragments not supported in query HOT 8
- Spec assertion failed, perhaps because of trim-v interceptor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re-graph.