pathom

hadils 2024-01-08T13:13:45.097539Z

I am having a hard time with an EQL query with an ident and params:

(pathom '[{([:yardwerkz.yard/postal-code "85286"] {:yardwerkz.job/service :yardwerkz.service/mowing-lawn}) {:yardwerkz.yard/price-statistics [:yardwerkz.price-statistics/average]}}])
the (pco/params env) in my resolver returns {}. I tried the example and it works. I don’t know what I am doing wrong. Thanks for your assistance!

Linus Ericsson 2024-01-08T14:17:50.438209Z

Is your query syntax correct? What does the first map in the vector mean? I haven't used Pathom for a long time...

hadils 2024-01-08T14:23:13.381679Z

The first map in the vector are the parameters to the resolver.

Linus Ericsson 2024-01-08T14:27:12.789919Z

There is only one map in the vector in the example above. [{ (...) {... }}]. Is this correct? Then I don't understand what your pathom function expects..

hadils 2024-01-08T14:32:40.511369Z

My pathom function takes a quoted vector of EQL

Linus Ericsson 2024-01-08T14:34:17.015659Z

Can you paste the code of the pathom function?

hadils 2024-01-08T14:38:17.752379Z

Sure.

(def pathom (p.eql/boundary-interface @env))

Linus Ericsson 2024-01-08T14:46:11.297509Z

OK, I would need the whole code example - and also which pathom version you are using to understand

Linus Ericsson 2024-01-08T14:47:37.567029Z

According to this example the resulting pathom function is multi-arity: (pathom {:app/current-user-id 1} [:user/login]) https://pathom3.wsscode.com/docs/eql/#using-eql-interface

Linus Ericsson 2024-01-08T14:49:06.527979Z

Also, is env an atom? The pathom definition will only give you the env at definition time.

hadils 2024-01-08T14:59:16.066859Z

No, env is a delay.

👍 1