Fork me on GitHub
#pathom
<
2019-09-25
>
Brian15:09:14

@wilkerlucio I might be wrong but I have this idea where I'll be able to take my users' query right off the wire and pipe it into pathom using '(<!! (parser {} query))` and that worked fine but now I'm trying to build a query which allows me to input a first and last name so that I can call :person/full-name. It sounds like multiple inputs is the answer but I don't have an ident to work with like the :customer/id equivalent. The real problem I'm trying to solve is I want my users to be able to give me an IP and a port and I can tell them if that combination is in our database.

Brian15:09:40

I can do this with (<!! (parser {:pathom/context {:entry/port "433" :entry/ip "127.0.0.1"}} [:entry/blacklist?])) BUT that extends beyond them sending a query because I'd also have to parse out their context and I want my users to only have to send me the query. Is that possible? If so, what is the query I would use to call the person-name-resolver here https://wilkerlucio.github.io/pathom/v2/pathom/2.2.0/connect/resolvers.html#_derivedcomputed_attributes?

wilkerlucio16:09:06

@brian.rogers in the second link I sent to you, if you are using connect, you can do queries like this:

wilkerlucio16:09:09

(parser {} '[{([:person/id 123] {:pathom/context {:person/first-name "Brian" :person/last-name "Last"}})
              [...]}])

wilkerlucio16:09:53

note that we still need an ident, its important to separate the "identity" from the record, if there is no identity at all, then anything that you put there should work anyway

Brian19:09:00

Thanks @wilkerlucio! Pathom is truly incredible

🙏 4