graphql

hadils 2022-09-24T22:29:24.204819Z

Hi! I am using re-graph with AWS AppSync. I have a problem with this code:

(rf/dispatch [::rg/subscribe
                  {:id        "help"
                   :query     "subscription MySubscription {\n  onCreateTestModel {\n    id\n    title\n  }\n}"
                   :variables {:some "variable"}
                   :callback  [::on-thing]}])
I am getting the error:
Error: Doesn't support name:
which indicates there’s a nil parameter to the name function as far as I can tell. I looked through the re-graph code (0.2.0) and none of the instances where name is invoked seem to be problematic. Any run into this or can help me? Thanks in advance!

2022-09-26T09:03:07.762119Z

your dispatch looks correct to me, i.e. identical to https://github.com/oliyh/re-graph/blob/master/test/re_graph/core_test.cljc#L67-L70

2022-09-26T09:03:49.964609Z

are you sure the error is not occurring in your callback? if you don't have a stacktrace, how do you know the error is coming from re-graph?

2022-09-25T08:04:05.017849Z

Hello, are you getting any stack trace at all (are you on cljs?)

2022-09-25T09:32:35.304519Z

And how did you call init?

hadils 2022-09-25T11:48:19.361279Z

Good morning @oliy. I called init and am not getting a stacktrace

hadils 2022-09-25T12:50:38.668669Z

I am on cljs, I am using Krell and re-frame