This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-06
Channels
- # announcements (18)
- # asami (3)
- # aws (10)
- # babashka (47)
- # beginners (343)
- # calva (36)
- # cider (4)
- # clojure (66)
- # clojure-europe (9)
- # clojure-nl (3)
- # clojure-uk (23)
- # clojurescript (30)
- # community-development (69)
- # conjure (1)
- # eastwood (9)
- # events (7)
- # fulcro (81)
- # graalvm (1)
- # malli (5)
- # meander (1)
- # off-topic (41)
- # pathom (15)
- # rdf (1)
- # reitit (6)
- # sci (57)
- # shadow-cljs (18)
- # spacemacs (4)
- # startup-in-a-month (1)
- # testing (2)
- # vim (1)
Hello! I'm just getting started with Pathom. My immediate use is to create a mock remote for Fulcro so I can test data loading without actually hooking up a backend. So, this is in cljs. I'm seeing behavior I don't understand when using defresolver
. When I use a function call as the outermost part of the body, I get a bunch of ::pc/not-found
results. When the outermost part is a map, it "works". Even wrapping the map in an identity call causes me to get the ::pc/not-found
results 😕 Here's a gist showing my explorations: https://gist.github.com/grzm/5cc47bbe645651c70fa4bcdad02e6f52
I'm sure it's something simple as I'm new to pathom and relatively inexperienced with cljs, but I'm stumped.
hello, welcome to the channel! I gave a read, I see you are using the parallel-parser
with reader2
, thats a bad combination, I suggest you keep with the regular parser
, the parallel-parser is only good in a very specific situations, for most users its unescessary complications. if you need async, use async-parser
+ async-reader2
also noticed you have a typo in ::pc/output
(in your code its ::pc/ouput
)
Thanks for the pointers on parallel-parser. I was cribbing from examples I found in the fulcro book code: https://github.com/fulcrologic/fulcro-developer-guide/blob/master/src/book/book/pathom.cljs#L16-L25
I'm hoping to put together some simple examples of the pieces to share for those starting out.
thanks, apprecited, another page you can get some starting samples: https://blog.wsscode.com/pathom/v2/pathom/2.2.0/connect/resolvers.html
and the pathom 3 docs can be a nice read too, its more organized, and altough the interface is a bit different on the edges, all the concepts are transferable: http://pathom3.wsscode.com/
(with Fulcro, primarily, but from what I gather, they're pretty independent: I'm mostly concerned with not finding examples to learn from as I get started)
I'm also wondering about the mock-http-server expecting a parser that returns a channel. Though, it looks like I might be able to mock a remote based on https://github.com/fulcrologic/fulcro/blob/932095ba094fae1b7576f85fadd2f6b2eb168ddc/src/workspaces/com/fulcrologic/fulcro/cards/form_cards.cljs#L17-L25