Fork me on GitHub
#pathom
<
2020-07-30
>
Thijs Creemers12:07:19

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?

wilkerlucio14:07:58

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

wilkerlucio14:07:09

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

Thijs Creemers14:07:45

Thanks for the reply

Thijs Creemers14:07:37

That will be helpful, thanks

joshkh15:07:29

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
   }
 }
 "