oliyh / re-graph

A graphql client for clojurescript and clojure
460 stars 39 forks source link

Spec assertion failed, perhaps because of trim-v interceptor #96

Open joshcho opened 1 year ago

joshcho commented 1 year ago

I am setting up as follows:

(rf/dispatch [::re-graph/init
                {:http {:url "http://localhost:8888/api"}}])

Getting this error

Uncaught Error: Spec assertion failed
-- Spec failed --------------------

  [{:http {:url "http://localhost:8888/api"}}]

should satisfy

  map?

I think this may be because I register rf/trim-v as a global register using rf/reg-global-interceptor. How would I resolve this situation?

oliyh commented 1 year ago

Hi,

I think your assumption is a good one. I'm not really sure how libraries are mean to cope with that, unless the untrimmed value is still available in the effect (which I think it is). Just to confirm, if you remove your global trim-v does it work?

Cheers