@lilactown I would like this:
(pc/defresolver pet-pull
[_ _]
{::pc/input #{:pet/id}
::pc/output [:pet/id :pet/name :pet/age ,,,]
...)
(pc/defresolver owner-pull
[_ _]
{::pc/input #{:owner/id}
::pc/output [:owner/id :owner/name :owner/age ,,,]}
...)
(pc/defresolver pet-owner
[_ _]
{::pc/input #{:pet/id}
::pc/output [:owner/id]}
...)
(pc/defresolver owner-pets
[_ _]
{::pc/input #{:owner/id}
::pc/output [{:owner/pets [:pet/id]}]}
...)
[{[:pet/id 123]
[:pet/id
:pet/name
{:>/owner [:owner/id
:owner/name]}]}]
@lilactown I would go close with @souenzzo suggestion, when you wrap the result in things like [{:pet [:pet/id :pet/name :pet/age ,,,]}]
you miss out on some connection leverage between the attributes, because of the nesting
that property is fine, as long as the children entities only link to one owner
but the alias is also a good option, and keeps the data easier to reason (you can see the alias going on)