Fork me on GitHub

I'm a bit stuck on a use case. I'm wanting to take the example from , but instead of having the total stored under :items, instead bring it up to the top level map next to :items as something like :total-items. I'm not sure how to add the nested query into the inputs set on a resolver, or even if it's possible I've been playing with

(pc/defresolver total-items-resolver
  {::pc/input #{[{:items [:number]}]}
   ::pc/output [:total-items}
and request with
(parser {} [:total-items])
which in my mind matches the list-things resolver from the example, then can operate on that. So far I can't figure out how to do it. Is there a way to do this currently or am I barking up the wrong tree?


hello, it looks like what you want is nested inputs, Pathom 2 doesn't have support for that


Oh that works perfectly! Thank you so much!


Are pathom 2.4 resolvers and mutations directly invokable like they are in pathom 3?


I want to unit test them in isolation (without a parser)


The answer is no, they are just maps.