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
https://github.com/souenzzo/eql-realworld-example-app/blob/master/src/conduit/client/rest.cljs#L17
fwiw I am using fulcro + pathom3
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
)
Nice to have another pair of eyes on the code 🙂
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/
Thoughts on a beginner just starting with Pathom 3, and skipping Pathom 2?
(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
(I guess these are better asked in #fulcro)
Figured out my problem above while trying to recreate it - the mutation was returning idents for the subtasks when they needed to be maps... So pebcak..