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)
@zilti this? https://github.com/fulcrologic/fulcro-inspect/issues/94
@tony.kay hmm yes, that solves it, thanks! Weird though... Thanks Google...
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]}
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.So in config/dev.edn
I have
{:my.custom.namespace/config {:connect-parser true}}
@wilkerlucio I got the same error using that DefaultHandler code.
@rob703 Using your defresolver worked perfectly.
Glad to hear that!
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)