This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-04
Channels
- # announcements (5)
- # aws (12)
- # beginners (76)
- # boot (29)
- # cider (24)
- # circleci (9)
- # clojure (64)
- # clojure-dev (27)
- # clojure-europe (3)
- # clojure-houston (1)
- # clojure-italy (33)
- # clojure-nl (19)
- # clojure-poland (1)
- # clojure-spec (6)
- # clojure-uk (20)
- # clojurescript (103)
- # clojutre (1)
- # code-reviews (60)
- # cursive (76)
- # data-science (20)
- # datomic (20)
- # duct (58)
- # figwheel-main (4)
- # fulcro (36)
- # graphql (6)
- # kaocha (4)
- # onyx (1)
- # pathom (15)
- # quil (3)
- # re-frame (15)
- # reagent (15)
- # reitit (9)
- # remote-jobs (2)
- # rewrite-clj (16)
- # ring-swagger (7)
- # shadow-cljs (132)
- # spacemacs (12)
- # sql (5)
- # vim (9)
- # xtdb (12)
- # yada (4)
Is there a way to have ::pc/input
be parameterized based on another keyword? e.g. When :type
is :a
, I require :a1
. When :type
is :b
, I require :b1
.
@U066U8JQJ Is there a way to do this?
no, this sounds like a case for unions though
had you checked those?
no, that's more a thing you have to do at query level, when you have different queries depending on the branching type
this not a resolver level concern
whats your use case?
I have a single map that requires different ::pc/input
s depending on the value of a key in the map.
that's the implementation detail you are looking for, but what is your use case? what kind of query you need to handle?
just to be clear, what you asked specifically, is not supported, there are some already complicated rules to ensure everything runs as is, this is not a trivial thing to change, but there are many ways to model things, so I'm tryign to get your problem so we can try to model it in a way that aligns with how the library works
I have an entity that looks something like this
{:metric/integration {:integration/type :integration.type/aws}
:metric/source :metric.source/aws-cloudwatch
:metric.cloudwatch/metric-name "Foo"}
We have a function called metric-query
that will take that metric map and issue a query to the correct destination based on attributes defined in the map. That function will return a vector of points that I want to attach to this map under the key :metric/provider-points
.sorry, I'm not getting it yet, can you tell me some query examples and expected results?