Fork me on GitHub
#pathom
<
2019-08-03
>
souenzzo02:08:26

there is examples of connect + unions? docs just cover "internal" stuff

souenzzo02:08:17

(let [env {::pc/register (pc/resolver `a {::pc/output [{:a {:b [:c]}}]} (fn [& _] {:a {:b {:c 42}}}))}
      ctx {::p/reader  [p/map-reader pc/all-readers]
           ::p/plugins [(pc/connect-plugin env)]}
      parser (p/parser ctx)]
  (parser ctx [{:a {:b [:c]}}]))
=> {:a {:c :com.wsscode.pathom.core/not-found}}
;; expected: {:a {:c 42}}

wilkerlucio13:08:07

I agree, we need better docs around that too, I'm doing a revamp on the docs now, I'll add something on thta

👍 4