This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-30
Channels
- # admin-announcements (1)
- # announcements (1)
- # babashka (8)
- # bristol-clojurians (1)
- # calva (36)
- # clojure (115)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-uk (161)
- # clojuredesign-podcast (3)
- # clojurescript (71)
- # core-async (34)
- # cursive (26)
- # datomic (43)
- # docker (2)
- # emacs (24)
- # figwheel-main (1)
- # fulcro (36)
- # graalvm (7)
- # immutant (2)
- # jackdaw (1)
- # jobs (2)
- # leiningen (8)
- # luminus (5)
- # off-topic (29)
- # onyx (1)
- # other-languages (5)
- # pathom (6)
- # pedestal (3)
- # reagent (11)
- # ring (8)
- # shadow-cljs (42)
- # spacemacs (17)
- # specter (6)
- # tools-deps (80)
- # videos (1)
Can you provide multiple 'idents' to the root of a query? If so, how? For example, if you want to test a resolver that requires two inputs.
For example, this is what I have tried so far...
[{[:input1 "foo" :input2 42] [:product]}]
The only other place where I currently am using resolvers that take two items, one of the items is a global. I have had no issues with using that one.
Yes, you have to use multiple inputs: https://wilkerlucio.github.io/pathom/#_multiple_inputs
I submitted an improvement idea about this, see the thread for some points on this use-case: https://github.com/wilkerlucio/pathom/issues/140
@austin021 you either have to create a composite key attribute like [{[:input1+input2 ["foo" 42]] [:product]}]
or do [{([:input1 "foo"] {:pathom/context {:input2 42}}) [:product]}]
. My idea was to enable [{{:input1 "foo :input2 42} [:product]}]
which I still believe is nicer syntax so I’ll probably release a tiny lib to enable it if you want to enable it in your parser.