This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-27
Channels
- # aleph (5)
- # announcements (18)
- # beginners (200)
- # cider (25)
- # cljdoc (4)
- # cljsrn (3)
- # clojure (90)
- # clojure-europe (3)
- # clojure-finland (5)
- # clojure-france (1)
- # clojure-houston (1)
- # clojure-italy (8)
- # clojure-nl (15)
- # clojure-spec (24)
- # clojure-uk (20)
- # clojurescript (199)
- # core-async (2)
- # cursive (45)
- # data-science (14)
- # datomic (33)
- # duct (13)
- # fulcro (4)
- # graphql (3)
- # kaocha (9)
- # leiningen (24)
- # nrepl (16)
- # off-topic (105)
- # pathom (15)
- # pedestal (28)
- # re-frame (1)
- # reagent (14)
- # shadow-cljs (28)
- # spacemacs (8)
- # tools-deps (8)
- # vim (4)
@wilkerlucio can I get partial results from pathom?
Kind of
(partial-parser ctx [{[:user/id 1] [:user/name]}]) => {:result {:user/name "foo"} :ctx {..ctx..}}
<< here the parser will call the user-by-id
, that return's {:user/name "foo" :user/active? true}
then if I call (partial-parser ctx-from-the-return [{[:user/id 1] [:user/active?]}])
it will return {:user/active? true}
without call user-by-id
you can send as param to any ident query, so your follow up read will be like: [{([:user/id 1] {:pathom/context ctx-from-the-return}) [:user/active?]}]
that gets easy to hook in Fulcro load
in the :params
setting doing an ident load
That looks very interesting!
and for gql compat, its quite easy to implement your own custom attribute to support this same feature, check the sources for the ident reader: https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/connect.cljc#L1367-L1375
Hey @wilkerlucio, just got back around to looking at the pagination stuff again. One thing I’m trying to figure out is how to tie generic keys (per @mitchelkuijpers example)
[../has-next?
{:atlas-crm.pagination/items (prim/get-query Entity)}
{:>/pagination (prim/get-query pagination/Pagination)}]
to the actual data that got resolved from say Entity
. I guess in your example, the “paginated collection” resolver is effectively wrapping the “real” collection so it’s more straightforward ?Do you have the placeholder plugin enabled in your parser?
This is my pagination query if that helps:
[:atlas-crm.pagination/has-next-page?
:atlas-crm.pagination/has-previous-page?
:atlas-crm.pagination/size
{:atlas-crm.pagination/items [:atlas-crm.pagination.items/cursor]}