Fork me on GitHub
#pathom
<
2018-11-15
>
maxt07:11:59

@wilkerlucio Hi! Can I get query params in a resolver somehow? For queries like ['(:find-events {:before "2018-01-01"})]

wilkerlucio07:11:46

hello, you can get it from the ast, like: (-> env :ast :params)

maxt07:11:18

Hm, I didn't see it there, I'll have another look, thanks

wilkerlucio07:11:36

I think that's a missing topic in the book, but a good one to add

wilkerlucio07:11:45

there is some info here: https://wilkerlucio.github.io/pathom/#Readers but quite outdated, params should a have a section somewhere else

maxt08:11:09

It might be that I confuse the connect api with the other. I'm trying to use defresolver, and the :ast doesn't seem to include params. Do I need a speical reader for that?

maxt08:11:39

Sorry, if I reduce my test-case I do get the :params in the :ast. I'll have another look at my code. Thank you for your reply!