Fork me on GitHub
#pathom
<
2021-09-10
>
Jakub Holý (HolyJak)10:09:24

I stumbled upon a mystery in Pathom 2, using Fulcro Inspect EQL tab. I have a mutation that throws an exception and thus this works as expected:

[{(com.example.mutations/create-random-thing {:tmpid 123}) [:com.wsscode.pathom.core/errors]}]
; =>
com.example.mutations/create-random-thing
 {:com.wsscode.pathom.core/reader-error "fake error - {}"}}
but if I add :p/errors to the transaction (which is actually likely unnecessary / useless, as well as the ::p/errors inside the mutation join), suddenly the output changes in a weird way:
[:com.wsscode.pathom.core/errors
 {(com.example.mutations/create-random-thing {:tmpid 123}) [:com.wsscode.pathom.core/errors]}]
; =>
{com.example.mutations/create-random-thing
 {:com.wsscode.pathom.core/reader-error
  "Mutation not found - {:mutation com.example.mutations/create-random-thing}"},
 :com.wsscode.pathom.core/errors :com.wsscode.pathom.core/not-found}
Why do I suddenly get "Mutation not found" error?! (FYI this is related to https://github.com/fulcrologic/fulcro/pull/486) 🙏

wilkerlucio19:09:03

this is a bug in Pathom Viz in terms of handling mutations, its old but its been a while since someone stumble on it, I made an issue to track it: https://github.com/wilkerlucio/pathom-viz/issues/69

👍 2