This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-26
Channels
- # aleph (5)
- # announcements (16)
- # babashka (36)
- # beginners (161)
- # calva (24)
- # cider (8)
- # circleci (45)
- # clj-kondo (5)
- # cljs-dev (25)
- # cljsrn (5)
- # clojure (116)
- # clojure-europe (10)
- # clojure-nl (18)
- # clojure-uk (14)
- # clojuredesign-podcast (6)
- # clojurescript (50)
- # cursive (12)
- # data-science (8)
- # datomic (8)
- # duct (39)
- # emacs (6)
- # fulcro (21)
- # graalvm (12)
- # kaocha (17)
- # off-topic (184)
- # pathom (1)
- # pedestal (2)
- # re-frame (31)
- # reagent (24)
- # reitit (1)
- # sci (1)
- # shadow-cljs (23)
- # sql (147)
- # tools-deps (8)
- # vrac (3)
- # xtdb (35)
Currently, file-upload/wrap-file-upload
does not put a :response-type
into the request, which results in the wrap-fulcro-response
refusing to decode the transit JSON in response body. This means that I cannot add any mutation join when making a file-upload mutation. Is this intentional? Thanks!
I updated my chrome to the latest build, and fulcro inspect does not connect - Version 83.0.4103.116 (Official Build) (64-bit)
. If just says No app Connected
I had problems with Fulcro Inspect as well, and at first thought it was connected to me updating Chromium, but it ended up just being a Fulcro Inspect bug... have you tried uninstalling and then re-installing Inspect?
Works fine for me 🙂 http://book.fulcrologic.com/
Hi, I would love to hear your feedback on the following: How can I build an API that is composable with fulcro ? This is a hard issue but I'm looking for some directions / solutions that work now. I'm working on Apache James (email server) and we need an admin interface. The app is built from multiple components and can have multiple functionalities enabled. For example: we can have things for managing user quota, re-indexing of mailboxes, smtp queue management, etc. Most of these are extensions and can be deployed or not. What is the strategy for handling this use case? Is there a way to compose the API: if I add an extension I can add the API extension for it + deploy the companion UI app. What are your thoughts on this? Is there any prior work related to what I am saying? I can't shake the feeling of this being similar to how kubernetes manages their API - with types and versions https://kubernetes.io/docs/concepts/overview/kubernetes-api/ . Is this possible with fulcro ? Is this possible with clojure (e.g. has anyone done it and shared his solution) ?
Well... fulcro is mostly a client library. It can consume any API you want. I recommend to jump over to #pathom and ask @U066U8JQJ about the topic on how to write EQL APIs or how to use the parser on the client to make queries across multiple endpoints.
For the UI, each extension could be an independent Fulcro app, mounting to a different, existing html element, I suppose. Do you need any interaction between the UI apps? If so then look into route target component lazy loading and perhaps the multi root renderer
Regarding the backend, as Bjorn suggests, @U066U8JQJ might have good input. A simple solution would be perhaps if each extension had its own pathom parser and Ring handler (so each would use the api at eg /extensions/ext-x-id). When you discover / register an extension you would simply add its handler + url to the map of known extension endpoints...
If you prefer a single endpoint and Pathom parser that should be ok too - it is just data (look what defresolver does). Simply delay the creation of the parser until all extensions are loaded and expose their resolvers.
Regarding how to support plugins, I'd ask in #clojure, look at what Kaocha does.. M
There seems to be another problem that's preventing file-upload from supporting mutation joins.
The wrap-file-upload
currently uses com.fulcrologic.fulcro.algorithms.transit/transit-clj->str
to encode the transation. The latter has the following line:
(let [opts (assoc opts :transform t/write-meta)]
#?(:cljs (t/write (writer opts) data) ...)..)
This enforces writing of meta. However, typically mutation joins are used with (comp/get-query ....)
, which will add meta into the transaction. Among the added meta are defsc classes, which cannot be serialized, therefore resulting in error:
react_devtools_backend.js:6 repl/invoke error Error: Cannot write Function
at Object.writer.marshal (writer.js:452)
at Object.writer.emitMap (writer.js:320)
at Object.writer.marshal (writer.js:444)
at Object.writer.emitObjects (writer.js:173)
at Object.writer.emitArray (writer.js:184)
at Object.writer.marshal (writer.js:441)
at Object.writer.emitTaggedMap (writer.js:377)
at Object.writer.emitEncoded (writer.js:404)
at Object.writer.marshal (writer.js:447)
at Object.writer.marshalTop (writer.js:476)