This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-07
Channels
- # babashka (17)
- # beginners (33)
- # calva (9)
- # cider (2)
- # clj-kondo (17)
- # cljs-dev (2)
- # cljsrn (2)
- # clojars (3)
- # clojure (60)
- # clojure-australia (2)
- # clojure-europe (8)
- # clojure-gamedev (5)
- # clojurescript (27)
- # cursive (2)
- # emacs (9)
- # fulcro (8)
- # gratitude (5)
- # lsp (41)
- # malli (3)
- # meander (18)
- # pathom (5)
- # polylith (25)
- # re-frame (17)
- # reagent (1)
- # rewrite-clj (6)
- # shadow-cljs (11)
- # uncomplicate (5)
- # vim (6)
- # web-security (5)
@wilkerlucio if you have a minute sometime can you keep me honest here please? https://clojurians.slack.com/archives/C053AK3F9/p1636299859332600?thread_ts=1636204030.290000&cid=C053AK3F9 Is this an accurate description of the approach you recommend with Pathom? I searched the docs for "qualified keys" and other variations thereof and only found a few small mentions. Are these ideas you mostly explore in the videos linked here: https://github.com/wilkerlucio/pathom/blob/b36c4c494493dc8819b6a89f977306c57d3840d1/README.md#see-a-talks-on-the-concepts or am I reaching in this description?
Hello guys, I just started playing around with pathom3 after watching the london clojurians talk. I got a question, how does a resolver that returns a collection of data look like? Is it a resolver that returns a map with a single kv pair and the value's the collection basically?
Yes. Every "value" in pathom should be "named" "named" values can be requested by a query. If you write a resolver that returns a collection directly, how would the query be?! For example:
;; just a example. It do not work.
(defresolver my-coll [env input]
[1 2 3])
Which query you need to run to get [1 2 3]
back?!
It can't fit in the model.
To solve this, we always return the value with a keyword
(defresolver my-coll [env input]
{:my-coll [1 2 3]})
Now you can request this value with the query [:my-coll]
and it will return {:my-coll [1 2 3]}
Thanks alot
Also its common that the items of collection are also maps, so they enable further processing using sub queries