This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-07
Channels
- # announcements (2)
- # babashka (18)
- # beginners (45)
- # bristol-clojurians (1)
- # calva (2)
- # cider (8)
- # clara (8)
- # clj-kondo (4)
- # cljdoc (6)
- # clojure (69)
- # clojure-chennai (1)
- # clojure-dev (21)
- # clojure-europe (3)
- # clojure-gamedev (3)
- # clojure-india (1)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-spec (7)
- # clojure-uk (70)
- # clojurescript (122)
- # cloverage (5)
- # cursive (2)
- # data-science (3)
- # fulcro (21)
- # graalvm (3)
- # graphql (14)
- # jackdaw (2)
- # jobs (2)
- # lumo (2)
- # malli (1)
- # mount (1)
- # off-topic (22)
- # re-frame (2)
- # reitit (5)
- # ring (7)
- # shadow-cljs (47)
- # spacemacs (11)
- # tools-deps (127)
- # vim (16)
- # xtdb (9)
Just pushed rc's of lacinia to clojars. Going to put them up in production in the next couple of days.
Hello, I’m trying to prototype using Lacina with wrapping a REST api and having some issues with async resolvers. I followed the example from the relevant docs. However, I’m getting ” May only realize a ResolverResultPromise once” when trying to resolve the rest of the sub objects off off the main query. Here’s what I’m trying to do: https://gist.github.com/miguelbermudez/10a4f2bcb2d6fe457a6d4a87e9384176
If I make a query for just patient
it works, if I query for patient { surgery { } }
that works. If I try to get patient { surgery {} pathology {} }
that results in an the error
I don't see anything that jumps out, the rest of the stacktrace from that exception should tell you where the error is happening, which will tell you if it is happening in one of the functions you wrote, or in the internals of lacina
this is the stacktrace:
Exception in thread "Thread-21" java.lang.IllegalStateException: May only realize a ResolverResultPromise once.
at com.walmartlabs.lacinia.resolve$resolve_promise$reify__1875.deliver_BANG_(resolve.clj:167)
at com.walmartlabs.lacinia.resolve$resolve_promise$reify__1875.deliver_BANG_(resolve.clj:183)
at ddp.graphql.schema$lookup_patient$fn__27609$fn__27611.invoke(schema.clj:89)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.lang.Thread.run(Thread.java:830)
you can but printlns like (println 1)
(println 2)
throughout lookup-patient to figure out the execution path through the function