This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-01
Channels
- # aleph (1)
- # architecture (7)
- # aws (1)
- # beginners (52)
- # boot (3)
- # cider (27)
- # cljs-dev (9)
- # cljsrn (16)
- # clojure (82)
- # clojure-dev (75)
- # clojure-italy (14)
- # clojure-nl (11)
- # clojure-spec (10)
- # clojure-uk (31)
- # clojurescript (49)
- # core-async (13)
- # datascript (11)
- # datomic (15)
- # duct (11)
- # emacs (8)
- # fulcro (46)
- # heroku (2)
- # jobs-discuss (27)
- # jobs_rus (1)
- # juxt (25)
- # keechma (1)
- # off-topic (59)
- # om (2)
- # pedestal (4)
- # portkey (113)
- # portland-or (1)
- # re-frame (14)
- # reagent (11)
- # shadow-cljs (278)
- # vim (2)
- # yada (2)
What is the recommend way to do non-data-driven fetches? I need to hit a server with a REST endpoint with basically static data (JWT public keys) in a JSON file. It seems like there should be a pretty easy way to do this, but I'm missing it somewhere.
if you need it to go into app state you can use merge-component
, transact against reconciler, or simply swap on the app state atom
if you want async separation from the UI layer, then I’d recommend adding a remote and using transact
Yea, I'd just be hitting a URL and the cutting up the data. I wasn't seeing anything but overhead in making it a remote. But I am trying to do things the idiomatic fulcro way so that I learn it.
The pathom
library is getting async support so you can write a parser for the remote…then you could parse out the fulcro query into the various REST calls, have them async fulfilled, and then feed back the result. That is “the way” to do this when REST is a serious part of your back-end
It's only going to be needed for interacting with servers I don't control. Anything that is mine will be Datomic style requests.
Do you know @wilkerlucio?
If I had to talk to almost anything in Fulcro that isn’t Fulcro, that’s how I’d do it
Cool, will watch both of those and beat on it some more, hopefully I can get things to start clicking.
That library is the “missing piece” for the “integration” story with non-datomic things…very important
So just to make sure it should be possible to use a fulcro client + pathom for a graph QL backend right?
The graph QL ecosystem is looking pretty impressive and I was thinking about using a graph ql as a service provider to do some prototyping.
I’d need to convert fulcro queries into graph ql and convert the response JSON into clojure maps with namespaced keys
@currentoor yes, but currently its not production ready, more a POC, but its a matter of putting effort on it, I found no "big barrier" that would not make it possible
if so, then it seems like fulcro would be the only clojurescript framework that could work well with graph QL
which could help with adoption?
relay doesn’t seem like it can work very easily with cljs, and it’s so far from idiomatic
adoption of fulcro i mean
I agree
this is one of the main motivations to work on this feature, enabling the reach into graphql ecosystem 🙂
there are several graph ql as a service providers, and the tooling around graph QL looks great
discoverable docs, query building, chrome plugins
my friend gave a talk about the current state of graph ql in cljs recently https://www.youtube.com/watch?v=sFUd-CtnJv8
the analogy he used is a little weird though…
cool, I would check it out later, gotta move now, cya