Fork me on GitHub
#pathom
<
2020-11-19
>
andrewzhurov15:11:56

hey guys is it possible to derive a RESTful API out of Pathom API? e.i. generate GET endpoints out of resolvers, POST endpoints out of mutations

wilkerlucio18:11:16

there is no library, but its a trivial thing to achive, once you have the indexes, you can rub a query for a given endpoint, and let pathom to the resolution

wilkerlucio18:11:26

use some http arg as param + some query

souenzzo19:11:23

I do (almost) that. It's internal on the app that I work on. But works great. We do not "generate REST from reslvers" We write things like

{:endpoint "/user/:id"
 :query '[{[:app.user/id ?id] [:.appuser/name :app.user/id :app.user/description]}]}