This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-26
Channels
- # announcements (18)
- # aws (17)
- # babashka (19)
- # beginners (141)
- # calva (73)
- # cider (4)
- # clj-kondo (13)
- # cljs-dev (2)
- # clojure (97)
- # clojure-europe (6)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (25)
- # clojure-sweden (2)
- # clojure-uk (25)
- # clojured (3)
- # clojurescript (63)
- # core-typed (6)
- # cursive (23)
- # data-science (4)
- # datomic (74)
- # fulcro (19)
- # graalvm (18)
- # graphql (3)
- # hoplon (63)
- # jackdaw (1)
- # juxt (23)
- # london-clojurians (3)
- # meander (7)
- # off-topic (23)
- # om (1)
- # pathom (13)
- # pedestal (2)
- # perun (2)
- # re-frame (38)
- # reagent (3)
- # reitit (24)
- # shadow-cljs (91)
- # spacemacs (14)
- # sql (4)
- # tools-deps (8)
- # vim (3)
Hi, Why do i have "Key must be an Integer" error when doing something like :
(<!! (parser {} [{([:catalogue/id 1] {:where {:a 1}})
[:catalogue/name
:catalogue/status]}])))
using this :
(<!! (parser {} [{'(:catalogues {:where {:a 1}})
[:catalogue/name
:catalogue/status]}])))
I can get the params with (`get-in env [:ast :params])` but when using it with
(<!! (parser {} [{'([:catalogue/id 1] {:where {:a 1}})
[:catalogue/name
:catalogue/status]}])))
I found that pathom/context work with that second case as this
(<!! (parser {} [{'([:catalogue/id 1] {:pathom/context {:where {:a 1}}})
[:catalogue/name
:catalogue/status]}])))
I can have params with (p/entity env)
bu this does not work with the first example
(<!! (parser {} [{'(:catalogues {:pathom/context {:where {:a 1}}})
[:catalogue/id
:catalogue/name]}])))
Maybe if you are using fulcro template there is plugin that moves params under query-params
in env
Thanks @U0MK9B06T i can get params with (:com.wsscode.pathom.core/root-query env) but i wonder if it 's the good way to access it ? I don't use fulcro no
Hi I was just curious about how folks are organizing their namespaces to best take advantage of prefixing and what have you. as one of my codebases has grown, we’ve taken breaking it up functionally,and making it more or less ‘clean’ with something like domain.concept.core (cljc)
domain.concept.resolvers (clj[s])
etc,. we’d just been sticking specs for say :domain.concept/foo
in the core ns, but recently added an empty domain.concept
ns so that we can ::dc/foo
and what have you. it seems more convenient, but just feels weird having the empty ns around just for the sake of naming.
I've adopted the same pattern, though I also include spec and coercion logic in the domain.concept.core
namespace.
we also have empty ns around just for naming attributes for domain specific data.
e.g. net.zenius.content
so that we can use shorthand ::content/name
, ::content/id
etc