This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-07
Channels
- # bangalore-clj (1)
- # beginners (255)
- # boot (29)
- # cider (16)
- # cljs-dev (13)
- # cljsrn (6)
- # clojure (200)
- # clojure-berlin (1)
- # clojure-dev (13)
- # clojure-dusseldorf (6)
- # clojure-greece (1)
- # clojure-india (1)
- # clojure-italy (1)
- # clojure-russia (33)
- # clojure-spec (28)
- # clojure-uk (27)
- # clojurescript (47)
- # cursive (32)
- # data-science (3)
- # datascript (1)
- # datomic (40)
- # emacs (39)
- # events (4)
- # fulcro (55)
- # graphql (16)
- # immutant (2)
- # luminus (2)
- # lumo (5)
- # off-topic (142)
- # onyx (50)
- # portkey (1)
- # re-frame (45)
- # reagent (80)
- # remote-jobs (2)
- # ring-swagger (3)
- # rum (9)
- # schema (3)
- # shadow-cljs (184)
- # spacemacs (3)
- # test-check (4)
- # unrepl (2)
- # yada (5)
@hlship Hi, is the above also recommended way how to pass session info back to handler which executed query? I have mutation which creates user and I want to return session token which is then stored in cookie. However I want this to be transparent to client.
Currently, the atom approach is the best way. If this keeps coming up, we may come up with a more functional alternative ... perhaps a way to add data to the :extensions key of the result map.
It dont look's like a good idea
(deftest keywords
(fact
(->graphkw :foo.bar-quux/var-bar) => :foo_barQuux_varBar)
(fact
(->datomickw :foo_barQuux_varBar) => :foo.bar-quux/var-bar))
Thinking about JSON responses, {":foo/bar": ":var/quux"}
will not be usefull. Not sure what I really need 😕
You can add custom scalars, if you want to. For example, in Lacinia, you could create a schema with a scalars map like {:Keyword {:serialize pr-str :deserialize read-string}}
.
(Don't actually use read-string
since that's a security issue, use a read-string function for EDN.)
I'd suggest reading the GraphQL spec. It's quite short and understandable. http://facebook.github.io/graphql/October2016/