We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(pco/defresolver order-line-items [] {::pco/output [{:order/line-items [:line-item/id :line-item/quantity :line-item/title :line-item/price-total]}]} {:order/line-items [{:line-item/id "1628545763873-1" :line-item/price-total 28.8M} {:line-item/id "1628545763873-2" :line-item/price-total 38.9M}]}) (def items-env (-> (pci/register [order-line-items]) (assoc ::pci/index-source-id `line-items))) (def items-request (p.eql/boundary-interface items-env)) (pco/defresolver order-items-total [{:keys [order/line-items]}] {::pco/input [{:order/line-items [:line-item/price-total]}]} {:order/items-total (transduce (map :line-item/price-total) + line-items)}) (def demo-env (-> (pci/register [(pcf/foreign-register items-request) order-items-total]) ((requiring-resolve 'com.wsscode.pathom.viz.ws-connector.pathom3/connect-env) "debug"))) (comment (p.eql/process demo-env [:order/items-total]))
The foreign-ast to the order-line-items currently is:
foreign-ast
order-line-items
{:children [{:dispatch-key :order/line-items, :key :order/line-items, :type :prop}], :type :root}
This is missing the sub-query part, it must include :line-item/price-total in the foreign-ast subquery.
:line-item/price-total
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The
foreign-ast
to theorder-line-items
currently is:This is missing the sub-query part, it must include
:line-item/price-total
in the foreign-ast subquery.The text was updated successfully, but these errors were encountered: