Fork me on GitHub
#pathom
<
2021-07-09
>
cyppan10:07:37

I’m playing with Pathom 3 EQL queries and I don’t understand why you get • '(:_>_/bret {::first-name "Bret" ::last-name "Victor"}) as a ::pco/input in your resolver • '(::todos {::todo-done? false}) in (pco/params env) instead I would expect the same behavior for both the EQL parameter and the placeholder parameter, do I miss something?

souenzzo11:07:57

@U0CL38MU1 it's about placeholders https://pathom3.wsscode.com/docs/placeholders/ when you use :>/anything, its parameter will be merged into the "input" > are special keywords. In any other context, it will end in p/params

cyppan14:07:38

yes I understand the “what” I was just wondering about the “why”

souenzzo14:07:24

Placeholders are the way to the client provide inputs to the server. Params are to customize a specific attribute resolver

cyppan15:07:55

but params can be provided by the client too

cyppan15:07:42

(def client-provided-toto-filters {::todo-done? false})
`(::todo ~client-provided-toto-filters)
But it might not be idiomatic to do that way...?

souenzzo15:07:23

params will not "connect" input will "connect"

cyppan15:07:44

aaah ok yes I understand ! thanks 🙂

souenzzo16:07:48

tbh they overlap a lot. I usually always prefer inputs Just swap to params if fall into some problem

👍 2