Fork me on GitHub
#pathom
<
2019-02-13
>
souenzzo01:02:38

Nice thread about data/graph/app/domain/API/ https://news.ycombinator.com/item?id=19147742

mss16:02:00

is there any way to force the reader in connect to return a sync value instead of a core.async channel? per the guidebook my parser config looks like:

{::p/env {::p/reader               [p/map-reader
                                        pc/parallel-reader
                                        pc/open-ident-reader
                                        p/env-placeholder-reader]
              ::p/placeholder-prefixes #{">"}}
             ::p/mutate pc/mutate
             ::p/plugins [(pc/connect-plugin {::pc/register (concat parser-mutations/mutations parser-queries/queries)})
                          p/error-handler-plugin
                          p/request-cache-plugin
                          p/trace-plugin]}))

wilkerlucio17:02:33

@mss can you tell more about what you want with that in the end? the parallel-parser will always return a channel given it uses a lot of core.async for coordination, if you want to run sync operations then you should use the regular parser, and use pc/reader2 instead of pc/parallel-reader

mss18:02:25

just playing around with the fulcro easy-server trying to glue it together to pathom. long term will be rolling my own server and the async mode is fine. just wasn’t clear in the dev guide how exactly to return a non core-async channel from the parser. all good, thanks!

wilkerlucio19:02:03

you can also just wrap the parser and make a core async block read, this way you make it sync

wilkerlucio19:02:34

example:

(def sync-parser [env tx]
  (clojure.core.async/<!! (real-parser env tx)))