This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-09
Channels
- # announcements (16)
- # babashka (28)
- # beginners (27)
- # calva (39)
- # chlorine-clover (6)
- # cider (8)
- # clara (28)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (78)
- # clojure-australia (3)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (14)
- # clojure-spec (2)
- # clojure-uk (11)
- # clojurescript (11)
- # core-async (24)
- # datomic (3)
- # deps-new (5)
- # emacs (9)
- # fulcro (4)
- # gis (2)
- # graalvm (9)
- # honeysql (2)
- # hoplon (5)
- # instaparse (1)
- # introduce-yourself (5)
- # jobs (5)
- # luminus (4)
- # observability (7)
- # off-topic (6)
- # pathom (18)
- # pedestal (5)
- # polylith (4)
- # re-frame (2)
- # reagent (1)
- # reitit (1)
- # remote-jobs (7)
- # shadow-cljs (47)
- # specter (1)
- # sql (27)
- # testing (6)
- # tools-deps (4)
- # vim (3)
- # xtdb (8)
I have a resolver that takes a few required attributes and an optional attribute. In a particular query, the optional attribute cannot be computed by its resolver. My environment contains the attribute-errors-plugin. I see that the attribute-errors-plugin reports an "Insufficient data" for the optional node/attribute.
A few questions: Is this intended behavior? If so, I'd like to understand the rationale. If this is not intended behavior, I'll produce a minimal test case
Oh, one more thing: The optional attribute is declared within pco/input as
{(pco/? :data-source.event/attributes) [:data-source.event.attribute/id
:data-source.event.attribute/friendlyName
:ui.attribute.selector/heading]}
I think that's the right syntax@markaddleman can you send a full example? may be a bug
I can easily send a the exception that attribute-errors plugin reports. Creating a minimal test case is possible, of course, but it will take me a day or two
Hi. I'm finally picking this back up and it turns out the repro case is very simple:
(pco/defresolver data-source-event-attributes []
{::pco/input []
::pco/output [:out]})
(def env (-> (pci/register [data-source-event-attributes])
(p.plugin/register (pbip/attribute-errors-plugin))))
(comment
(p.eql/process env [{'(:>/GroupBys {}) [(pco/? :out)]}]))
The query produces an attribute error. I don't think it shouldquerying optional items in eql/process isnt a thing
they only work in resolvers, not in eql process
Oh 😕 I have a resolver that does this query on its input. I figured I was simplifying by moving it to the client query
I'll keep trying to find a small repro case
and just to clear it up, they are not a thing there because there is no dependency on top of that, so if its not there, it just an edge thing, but maybe it could have some value in the sense of validation, not a thing at this moment, but if you believe this is a useful case please open a discussion on pathom 3 repo and we can keep that in mind
I just got a minimal case. I'll open a discussion on github
actually, my repro case may have found something different. I have a case where pathom cannot generate a plan where I think it should
Putting into github
Fixed on main
Thanks!
Fixed on main