Fork me on GitHub

Hey folks, I have a pathom parser that uses a shopify index, and adds additional resolvers. I want to reference the parser inside the resolvers so I can make the request to shopify. Is this possible? I'm pulling the parser out of the env like below, but I'm getting an unhelpful NullPointerException deep in the parser

(pc/defresolver resolver [env _]
  {::pc/output [{::foo/all [::foo/id]}]}
  (go {::foo/all (<! ((:parser env) {} [{(:shopify/..) [...]}]))}))


The only way I can get it to work is by constructing a separate parser for the shopify index and passing that into the top level parser ::p/env


((:parser env) {} should be ((:parser env) env [{(:shopify/... )}] part also unquoted. so it should be resulting in a [{nil ...}] query

👍 1

Thanks!! That did the trick, at least for queries by ident. For some reason global queries (quoted) [{(:shopify/customers {}) [...]}] are returning {} every time, even when the exact same query works from fulcro inspect query. It might be something unrelated though.

Abhinav Sharma19:10:18

Hello guys, The PartiQL query language from AWS seems like a good target for pathom adapters - would love to hear your thoughts on this