This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-17
Channels
- # announcements (6)
- # beginners (117)
- # calva (22)
- # cider (7)
- # clara (56)
- # clj-kondo (8)
- # cljdoc (3)
- # cljfx (26)
- # clojure (58)
- # clojure-czech (2)
- # clojure-europe (20)
- # clojure-greece (1)
- # clojure-india (7)
- # clojure-nl (11)
- # clojure-uk (100)
- # clojurescript (48)
- # conjure (24)
- # cursive (117)
- # data-science (3)
- # datascript (5)
- # datomic (33)
- # emacs (29)
- # figwheel-main (3)
- # fulcro (12)
- # jobs (1)
- # malli (40)
- # parinfer (4)
- # pathom (1)
- # quil (2)
- # re-frame (17)
- # reagent (20)
- # reitit (1)
- # reveal (97)
- # ring (5)
- # shadow-cljs (11)
- # spacemacs (12)
- # sql (4)
- # tools-deps (18)
- # xtdb (25)
Since today I get Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
when I try to use Fulcro Inspect (Inspect itself is just blank, I opened the console for Inspect)
I placed the resolver for the pathom index explorer into the fulcro-rad-demo app but I am getting an error:
(defresolver index-explorer [env _]
{::pc/input #{:com.wsscode.pathom.viz.index-explorer/id}
::pc/output [:com.wsscode.pathom.viz.index-explorer/index]}
{:com.wsscode.pathom.viz.index-explorer/index
(get env ::pc/indexes)})
Thu Sep 17 10:49:24 MST 2020 [worker-2] ERROR - POST /api
java.lang.RuntimeException: java.lang.Exception: Not supported: class com.fulcrologic.rad.blob$blob_resolvers$fn__41338
at com.cognitect.transit.impl.WriterFactory$1.write(WriterFactory.java:65)
at cognitect.transit$write.invokeStatic(transit.clj:167)
...
Caused by: java.lang.Exception: Not supported: class com.fulcrologic.rad.blob$blob_resolvers$fn__41338
at com.cognitect.transit.impl.AbstractEmitter.marshal(AbstractEmitter.java:194)
at com.cognitect.transit.impl.JsonEmitter.emitMap(JsonEmitter.java:171)
...
This is the query that fulcro inspect is running that fails:
{[:com.wsscode.pathom.viz.index-explorer/id
[:fulcro.inspect.core/app-uuid
#uuid "64989b68-c438-4fe4-9682-63b183441a9b"
:remote]]
[:com.wsscode.pathom.viz.index-explorer/id
:com.wsscode.pathom.viz.index-explorer/index]}
@U066U8JQJ ❤️ Also: > there is a bug in the current Clojure writer, it -would be nice with a link?
Hm my explorer code looks a bit different. I have the index explorer working like this:
(:require [com.wsscode.pathom.viz.ws-connector.core :as p.connector]
(pc/defresolver index-explorer [env _]
{::pc/input #{:com.wsscode.pathom.viz.index-explorer/id}
::pc/output [:com.wsscode.pathom.viz.index-explorer/index]}
{:com.wsscode.pathom.viz.index-explorer/index
(-> (get env ::pc/indexes)
(update ::pc/index-resolvers #(into {} (map (fn [[k v]] [k (dissoc v ::pc/resolve)])) %))
(update ::pc/index-mutations #(into {} (map (fn [[k v]] [k (dissoc v ::pc/mutate)])) %)))})
and then as last step of of cond->>
inside build-parser
:
(-> config :my.custom.namespace/config :connect-parser)
(p.connector/connect-parser
{::p.connector/parser-id ::my-parser})
I've added my.custom.namespace/config
to the config files and then turn the connector on and off there.@U066U8JQJ I got the same error using that DefaultHandler code.
@U012ADU90SW Using your defresolver worked perfectly.
yeah, that's quite annoying, this was one of the motivations to change Resolver to a type in Pathom 3, this way the type can control the transit output, avoiding this attempt to encode fns (which causes this trouble)