Hi all, I'm attempting to load about 30 rows of table data as individual re-graph queries and I am seeing that my queries don't complete and I can see in reframe-10x that a regraph.internals/register-abort event is being handled - are my queries being aborted? what can I do about this?
No, that is just an implementation detail for supporting the abort feature, it doesn't mean it's been run
Are you using websockets or http? Are all the requests being made / returning success?
I'm using http, and it looks like only one of my requests is actually being made, thanks for the tip to check the requests.
This is what I have in the effect handler that's supposed to be dispatching one query per date:
(re-frame/reg-event-fx
:table/set-counts-for-dates
[(re-frame/inject-cofx ::inject/sub [:table/dates])]
(fn [{db :db dates :table/dates} event]
(let [fx-list (mapv (fn [date]
[:dispatch [::re-graph/query
:query-counts-for-date
"($date: ID!){countsForDate (date: $date) {aircraftPatternCount flightCount}}"
{:date date}
[:table/set-counts-for-single-date]]]) dates)]
{:fx fx-list})))
But it's only dispatching the first re-graph/query event
Ah, you are setting the query id as :query-counts-for-date on each one. Re-graph is deduping them for you
ohhhh
thank you!!!
Make the id unique (or omit it altogether, if you don't refer to it elsewhere)
That did it! Thanks! I love your library
😊