Fork me on GitHub

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
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


just a minimal repro so I can see what you see

👍 2

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))))

  (p.eql/process env [{'(:>/GroupBys {}) [(pco/? :out)]}]))
The query produces an attribute error. I don't think it should


querying 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