Fork me on GitHub
#pathom
<
2020-07-30
>
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
   }
 }
 "