Closed cyppan closed 3 years ago
Can you clarify this? Pathom does support returning promises on resolvers, you just need to use the async runner. I also do have setups on CLJS and it works ok, I guess there may be a setup issue.
I mean from the Pathom viz "run query" button, because I get
clojure.lang.ExceptionInfo: Resolver my-resolver returned an invalid response: #object[java.util.concurrent.CompletableFuture 0x3957aae2 "pending"]
when I click it
Oh, I see, you are using an async parser in the CLJ side. Sorry, this is my bad on docs, to use Pathom Viz with async on CLJ, you have to tell the connector to do so:
(p.connector/connect-env env {::p.connector/async? true})
Otherwise it assume the CLJ parser is sync.
Oh yes I'm in Clojure didn't mention that sorry, ok thank you it works now
My resolvers return Promesa futures so I can't run my queries in Pathom viz, it would be nice to have the async processor used by default, or at least allow to set a flag or a config.