Fork me on GitHub
#pathom
<
2022-11-16
>
roklenarcic10:11:38

The client always requests certain attributes (like :tempids ) but often none of the resolvers executed return the attribute, which leads to `

::p.error/attribute-unreachable
a lot of the time. Is there a way around this? I wanted to introduce a resolver that returns :tempids {} without any input. But what will happen when the mutation DOES return :tempids {….}? which will be returned to the client?

caleb.macdonaldblack16:11:41

Priority should help here. I played around with a similar idea of a resolver that would generate and return ids if one wasn’t provided but it was a bit too confusing to debug. I recall caching having an interesting role. If I wanted multiple new ids, my resolver would return the initial cached value. I ended up scrapping the idea before messing with the caching.

caleb.macdonaldblack16:11:55

Is it possible the client could optionally request tempids? (pco/? :tempids)

roklenarcic16:11:19

Does (pco/? :tempids) work over the wire?

roklenarcic16:11:24

using transit here

roklenarcic16:11:52

the issue is that there are many transformations happening between my client code and server that transform query->ast->query again

roklenarcic16:11:32

oh so it’s a param

roklenarcic16:11:38

that should work I think

caleb.macdonaldblack16:11:57

I recall it working in an eql query

markaddleman16:11:02

Something like (pco/? :tempids) operates at the Pathom planner level so it is internal to how Pathom decides when there is sufficient input for a resolver