Fork me on GitHub
#fulcro
<
2020-09-17
>
zilti16:09:19

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)

zilti16:09:29

@tony.kay hmm yes, that solves it, thanks! Weird though... Thanks Google...

Michael W17:09:08

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]}

Jakub Holý (HolyJak)06:09:26

@U066U8JQJ ❤️ Also: > there is a bug in the current Clojure writer, it -would be nice with a link?

xceno14:09:08

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.

xceno14:09:16

So in config/dev.edn I have

{:my.custom.namespace/config {:connect-parser true}}

Michael W15:09:34

@U066U8JQJ I got the same error using that DefaultHandler code.

Michael W15:09:01

@U012ADU90SW Using your defresolver worked perfectly.

xceno15:09:17

Glad to hear that!

wilkerlucio15:09:41

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)