Discussion of issue 97 #99
Replies: 2 comments 1 reply
-
It's because the input check is more strict than outside queries. The version that's not input kinda works by accident because Pathom delays the plan computation for nested query parts. But for nested inputs Pathom verify the possibility ahead of time, so when we look at this resolver: (pco/defresolver workflow-ids->workflow-params [{:workflows.workflow/keys [workflow-ids]}]
{::pco/input [:workflows.workflow/workflow-ids]
::pco/output [:workflows.workflow/events]}
{:workflows.workflow/events (into [] (comp
(mapcat :workflows.workflow/events)
(distinct))
workflow-ids)}) In this specification there is no way to know that workflow ids will have Makes sense? |
Beta Was this translation helpful? Give feedback.
-
Is there a deep reason why input checks are more strict than outside queries? I think I understand why the input checks are strict: Pathom computes a plan for the query ahead of time. For debugging purposes, it is convenient to create an EQL query that matches the input to a resolver. If Pathom computes the EQL query differently than the resolver, debugging is harder. |
Beta Was this translation helpful? Give feedback.
-
Starting discussion from #97 (comment)
Why can Pathom resolve the join when it is in a client query but it cannot when the join is input to a resolver?
Beta Was this translation helpful? Give feedback.
All reactions