pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
andrewzhurov 2020-11-19T15:06:56.327900Z

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

wilkerlucio 2020-11-19T18:16:16.330900Z

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

wilkerlucio 2020-11-19T18:16:26.331400Z

use some http arg as param + some query

souenzzo 2020-11-19T19:35:23.331800Z

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