Fork me on GitHub
Abhinav Sharma13:09:26

Hi guys, I’ve been exploring the pathom/http/fetch api but having problem translating the clj-http code to the fetch code

(-> (http/request {:method  :get
                     :as      :json
                     :url     requestbin-url})

pathom fetch version, I’d only like to extract the resulting :body from this but due to async nature only a channel gets stored in outer var
  (<? (fetch/request-async {::http/url    requestbin-url
                            ::http/as     ::http/json
                            ::http/method "get"})))

Suggestions are welcome 🙂


@abhi18av that's the nature of async things, if you use pathom async or parallel parser you can return channels and pathom will process, async is contagious (like macros), once there you need to deal with it


Hello friends, for everyone here that asks, or try to use Pathom with Datomic, I've started working in a plugin to facilitate the integration between those two things:


I personally don't use Pathom with Datomic myself (I'm the middle game business, calling services) so feedback is very appreciated


currently it can auto-handles queries using :db/id or unique attributes, also helpers to query for entities automatically leveraging user sub-query, full docs on README


I hope you enjoy 🙂


we do, thanks for the great update!


@wilkerlucio let me know if you need any help on that, we use them together quite a bit


just went thru the docs, pretty nice stuff 🙂


thanks, for now would be great if you can try it out, and find the gaps/problems so we can iterate on it


I wish the client API supported filter, that’s a pretty cool way to support security


@eoliphant with the plugin we can have full control, I'm still wondering about ideas to make it, the most obvious are white/black listing for some attributes, @tony.kay other day also gave the idea to have some sort of nav? fn interface, where you get the context and decide if that attribute is allowed or not in that context (so far seems the most extensible idea)


yeah that also would work. attributes are easier i guess, but then there’s then need to limit based on ‘ranges’, etc


like I can see :person/name but only for entities where some other conditions are met