This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-18
Channels
- # aws (10)
- # beginners (43)
- # calva (1)
- # cider (7)
- # cljs-dev (83)
- # clojure (132)
- # clojure-dev (20)
- # clojure-europe (6)
- # clojure-greece (4)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-spec (21)
- # clojure-sweden (16)
- # clojure-uk (21)
- # clojuredesign-podcast (16)
- # clojurescript (74)
- # cursive (41)
- # datomic (7)
- # emacs (3)
- # fulcro (30)
- # graalvm (3)
- # graphql (2)
- # instaparse (1)
- # jobs (1)
- # joker (13)
- # kaocha (14)
- # off-topic (118)
- # pathom (13)
- # re-frame (5)
- # reagent (22)
- # shadow-cljs (67)
- # spacemacs (7)
- # sydney (1)
- # testing (1)
- # tools-deps (82)
- # vim (4)
- # xtdb (1)
Hey
I'm developing a application dashboard, and trying to keep api-url
as a "first class"
My query start with [{[:app/api-url "..."] [{:app/things [:thing/id :thing/stuff]}]}]
My first resolver do ::pc/input #{:app/api-url} ::pc/output [{:app/things [:thing/id]}]
Then it should call ::pc/input #{:app/api-url :thing/id} ::pc/output [:thing/stuff]
But there is no api-url
in {:thing/id ..}
input
There is some helper to "foward" some attributes?
@souenzzo this looks more like an environmet data, do you see :app/api-url
is an actual entity in your system, or this just data you need to flow down?
I'm not sure 😅
I started using it as a environment, associated with the browser session, but then I think "that if I want show a list of things
where there is things from 2 instances?"
its ok, but still feels like this should be something you set on the environment, it naturally flows down, and you can change it in the middle of queries using ::p/env
on the return of some data if you need to
we do something similar like that at nubank to deal with shards
the ::p/env thing may be missing docs (sorry), but in a gist, you do something like this in your resolver return value:
{:some/data 123 :deep/info {:more/data "meh" ::p/env (assoc env :app/api-url "new-url")}}
now when it gets to process :deep/info
, env will be changed, makes sense?