This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-11
Channels
- # announcements (18)
- # beginners (57)
- # calva (20)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (14)
- # clojure (124)
- # clojure-europe (5)
- # clojure-italy (5)
- # clojure-nl (10)
- # clojure-spec (4)
- # clojure-uk (44)
- # clojurescript (4)
- # clojutre (18)
- # clr (2)
- # cursive (25)
- # datomic (53)
- # emacs (18)
- # events (1)
- # figwheel-main (1)
- # fulcro (34)
- # joker (6)
- # kaocha (13)
- # nrepl (3)
- # nyc (24)
- # off-topic (1)
- # pathom (16)
- # protorepl (4)
- # re-frame (1)
- # reitit (27)
- # rewrite-clj (5)
- # shadow-cljs (38)
- # spacemacs (25)
- # sql (20)
- # vim (28)
- # xtdb (20)
yes, there is a standalone branch: https://github.com/wilkerlucio/pathom-viz/pull/7
I will be working on a bit more sophisticated version available as an nginx served SPA within a docker-image in the near future
Oh cool, thank you for the link. Is a “pathom server” a standardized thing? I imagine it makes assumptions on how the parser is actually exposed via HTTP. This is likely documented somewhere, I may need to RTFM 🙂
Ah, this is a good hint: https://github.com/wilkerlucio/pathom-viz/blob/b2349e68b011672796c4ed96a8dea7b7bb9491be/src/core/com/wsscode/pathom/viz/standalone.cljs#L25-L30
Looks like the query is encoded in form params the body as transit+json, and the response is sent in the body, also as transit+json
I’ve been reading through Fulcro’s networking implementation, and it also seems to use a similar approach (except for maybe sending the query as form-params)
Oh I may have misunderstood. The ::p.httml/form-params
key derives content type from ::content-type
https://github.com/wilkerlucio/pathom/blob/9b4c4a6bd07ec5ec570c0596eb446853e2904eed/src/com/wsscode/pathom/diplomat/http.cljc#L35-L37
Are these com.wsscode.pathom.diplomat.*
namespaces meant to be a general solution to using pathom over the network, or are they mainly intended to be used for development/tooling?
@cjsauer the diplomat idea is to abrastract away the impl between cljs and clj, this way we can have resolver collections that work on both (just having to replace the HTTP driver)
@thenonameguy thanks for pointing that out, to be honest I had forgot about it, but just add on my todo list, will try to check and merge it ASAP
Ohh okay, so the diplomat is meant to be used within resolver implementations? That makes sense.
@cjsauer here you can find an example: https://github.com/wilkerlucio/pathom-connect-youtube/blob/master/src/core/com/wsscode/pathom/connect/youtube/helpers.cljs#L50-L62
yeah, given you provide a compatible http driver 🙂 (which is a fn that understand the keywords we send)