This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-18
Channels
- # announcements (26)
- # beginners (107)
- # calva (26)
- # cider (55)
- # clj-kondo (7)
- # clojure (115)
- # clojure-europe (6)
- # clojure-houston (3)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-norway (1)
- # clojure-uk (42)
- # clojuredesign-podcast (3)
- # clojurescript (47)
- # clojutre (4)
- # cursive (7)
- # datomic (75)
- # fulcro (1)
- # graalvm (3)
- # graphql (16)
- # jobs (1)
- # jobs-discuss (13)
- # keechma (1)
- # leiningen (19)
- # luminus (5)
- # off-topic (33)
- # pathom (16)
- # re-frame (76)
- # reitit (4)
- # ring (5)
- # shadow-cljs (86)
- # spacemacs (52)
- # tools-deps (43)
- # vim (7)
- # yada (1)
Guys, excuse me if this has been asked before but I was wondering about something regarding Pathom 1. Is Pathom only meant for fetching data or is it possible to push the data as well? 2. For any API endpoint we need to write the parsers directly against the REST endpoint? Or is there a way to adapt the provided JS lib somehow
1. Mutations cover this need 2. Yes, generally you write a resolver which fetches your REST response, you usually fully flatten + qualify all attributes according to your own keywords
Thanks @U08E8UGF7 for the pointer here 1. I guess that here’s the relevant doc https://wilkerlucio.github.io/pathom/v2/pathom/2.2.0/core/mutations.html And https://wilkerlucio.github.io/pathom/v2/pathom/2.2.0/connect/connect-mutations.html Do you know of any other example of pushing data to a non-clojure server? 2. Got it 👍
1. yes, those are the correct docs what do you mean by pushing to non-clojure servers? In the context of Pathom that does not make sense to me
Hmm, I was thinking about using Fulcro+Pathom with a firebase backend
Oh, in that case I would write a CLJS pathom remote for Fulcro and fire off Firebase calls in the mutation resolvers
Na, not yet - I’m inclined towards the pure frontend use cases.
Then these firebase calls would need to be written against the REST interface right? https://firebase.google.com/docs/projects/api/reference/rest
@U2BU9G0LT to help thinking about it, consider that Fulcro only communicates using EQL, so any communication has to go via it, this means keywords for requesting data and mutations to change the world (in any way, like sending messages to firebase operations), makes sense?
Hi @U066U8JQJ, basically Pathom is the communication layer for Fulcro wrt outside world right, I get this. I guess to integrate with any rest/graphql backend it's important to teach this layer how to interpret the servers format right?
yeah, correct, I prefer to say EQL because Pathom is an impl of it, but you can make your own if you want, that is no direct thing connecting fulcro and pathom, instead both talk EQL
I think the distinction is important, because the language is formal and helps to understand the boundaries
Cool, will remember this :) Thanks!