This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-03
Channels
- # aleph (2)
- # announcements (13)
- # babashka (7)
- # beginners (36)
- # calva (26)
- # cider (11)
- # circleci (13)
- # clj-kondo (15)
- # clojure (105)
- # clojure-europe (79)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojurescript (17)
- # conjure (4)
- # core-logic (2)
- # cursive (10)
- # data-science (5)
- # datalevin (11)
- # datalog (14)
- # eastwood (6)
- # emacs (2)
- # figwheel-main (1)
- # fulcro (34)
- # google-cloud (1)
- # graphql (3)
- # introduce-yourself (7)
- # jobs (1)
- # leiningen (17)
- # lsp (46)
- # malli (2)
- # minecraft (3)
- # missionary (19)
- # off-topic (31)
- # other-languages (49)
- # polylith (2)
- # portal (5)
- # practicalli (1)
- # quil (77)
- # releases (1)
- # remote-jobs (1)
What's the correct way to provide variables when making a query to lacinia using re-graph? This is the example given in the readme but I can't seem to figure out how the 'id' field is populated.
;; perform a query, with the response sent to the callback event provided
(re-frame/dispatch [::re-graph/query
:my-query-id ;; unique id for this query
"{ things { id } }" ;; your graphql query
{:some "variable"} ;; arguments map
[::on-thing]]) ;; callback event when response is recieved
https://github.com/oliyh/re-graph@U26FJ5FDM I see
(re-frame/reg-event-fx
::get-account
(fn [cofx [_ username password]]
{:db (assoc-in (:db cofx) [:login-status :username] username)
:dispatch [::re-graph/mutate
"($username: String! $password: String!){get_account(username: $username password: $password) {reason iban token}}"
{:username username :password password}
[::on-get-account]]}))
at https://github.com/gklijs/bkes-demo/blob/b57d3d6c9f73671e61a8fbabaede1abc12667ab7/frontend/src/cljs/nl/openweb/bank/events.cljs#L112
I'll try to use this example to figure it out