Fork me on GitHub
#graphql
<
2022-05-09
>
oliy13:05:56

📯 📯 Hello all users of re-graph, I have been working on a new version which changes the API so that all functions/re-frame events use a single map argument instead of the varied and overloaded positional args it currently has, which make it unnecessarily complex and hard to maintain. There is an https://github.com/oliyh/re-graph/blob/re-frame-maps/UPGRADE.md which I would really appreciate some feedback on, explaining the rationale, the changes and the benefits. It's available on clojars now as version 0.2.0-SNAPSHOT if you would like to try it as well, although it is subject to change based on any feedback I get. Thank you! 😍

gklijs15:05:19

Can't guarantee I have the time, but try to think of it.

oliy15:05:05

here's a quick example:

(rf/dispatch [::re-graph/query "{ some { thing } }" {:some "variable"} [::my-callback]])
becomes
(rf/dispatch [::re-graph/query {:query "{ some { thing } }"
                                :variables {:some "variable"}
                                :callback [::my-callback]}])