pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
Thijs Creemers 2020-07-30T12:16:19.371300Z

I am trying to use pathom to send graphql queries to an exsting backend, In the documentation there are a few examples, but when I am trying the examples it appears as if I am working with an older library API. My Fulcro version is 3.0.10 and the pathom version is 2.2.31. Has anyone a hint?

wilkerlucio 2020-07-30T14:03:58.371400Z

hello, and yes, those docs are still on Fulcro 2, Pathom provides no direct helpers for Fulcro 3 at this point, you need to create a custom Remote on Fulcro 3, and hook the parser into it

wilkerlucio 2020-07-30T14:04:09.371600Z

here is an example of writing a remote like this for Fulcro 3 https://gist.github.com/wilkerlucio/c3c76024da0807223592cdd5bcd71d0e

wilkerlucio 2020-07-30T14:04:10.371800Z

Thijs Creemers 2020-07-30T14:04:45.372100Z

Thanks for the reply

Thijs Creemers 2020-07-30T14:19:37.373200Z

That will be helpful, thanks

joshkh 2020-07-30T15:26:29.375300Z

hello! is it possible to alias mutations? unfortunately i'm not getting the results i expected, but maybe my syntax is incorrect:

(pg/query->graphql '[{(myMutationFn {:com.wsscode.pathom.graphql/alias "alias1" :id "someid" :user "someuser"}) [:id :user]}
                     {(myMutationFn {:com.wsscode.pathom.graphql/alias "alias2" :id "someid" :user "someuser"}) [:id :user]}])
=>

; missing aliases:

"mutation {
   myMutationFn(id: \"someid\", user: \"someuser\") {
     id
     user
   }
   myMutationFn(id: \"someid\", user: \"someuser\") {
     id
     user
   }
 }
 "