This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-25
Channels
- # announcements (2)
- # asami (16)
- # babashka (55)
- # beginners (27)
- # calva (14)
- # cider (5)
- # clj-kondo (16)
- # cljs-dev (22)
- # clojure (72)
- # clojure-europe (89)
- # clojure-nl (10)
- # clojure-uk (7)
- # clojured (1)
- # clojurescript (14)
- # community-development (4)
- # core-async (15)
- # emacs (10)
- # events (2)
- # fulcro (3)
- # graalvm (1)
- # graalvm-mobile (71)
- # helix (7)
- # honeysql (2)
- # introduce-yourself (1)
- # jobs-discuss (17)
- # juxt (3)
- # lsp (62)
- # malli (13)
- # meander (7)
- # off-topic (14)
- # pathom (54)
- # polylith (6)
- # re-frame (11)
- # releases (1)
- # sci (22)
- # sql (9)
- # tools-deps (84)
- # vim (37)
- # xtdb (18)
In my working on Jakub's Fulcro exercise 7, TASK 3, I'm trying to play with some EQL queries.
After implementing the resolvers for team, player, address,
While [{:teams [:team/id]}]
works to get the expected results, but likewise,
[{:teams [:player/id]}]
yields {:teams [{:player/id :com.wsscode.pathom.core/not-found}]}
[{:teams [:address/id]}]
yields {:teams [{:address/id :com.wsscode.pathom.core/not-found}]}
Here are my implementation the resolvers for player and address repsectively:
(defresolver player [_ {id :player/id}]
{::pc/input #{:player/id}
::pc/output [:player/id :player/name :player/address]}
(case id
1 #:player{:id 1 :name "Luna" :address {:address/id 1}}
2 #:player{:id 2 :name "Sol" :address {:address/id 2}}))
(defresolver address [_ {id :address/id}] ; an ident resolver
{::pc/input #{:address/id}
::pc/output [:address/id :address/city]}
(case id
1 #:address{:id 1 :city "Oslo"}
2 #:address{:id 2 :city "Trondheim"}))
What are my mistakes? Thanks!
I guess it should be {:teams [{:team/players [:player/address] ]} - you must join on the team's property that actually links to players