Fork me on GitHub
#pathom
<
2021-12-03
>
Abhinav03:12:48

I'm relatively new to pathom and EQL. I was wondering what the syntax for predicates is in EQL. for e.g. If I want the name of a product and its cost I can get it with this query. [:product-name :product-cost] but what if I want the name and cost of products that cost less than 100$ or something. how would I express that in EQL? Thanks

dehli08:12:44

You're looking for parameters. https://pathom3.wsscode.com/docs/resolvers/#parameters So that might look like

[{(:acme/products
   {:max-cost 100})
  [:acme/product-name
   :acme/product-cost]}]
Let us know if you have any follow up questions!

clojure-spin 1
Abhinav10:12:36

omg yes. thank you so much

🎉 1