Fork me on GitHub
#pathom
<
2020-03-23
>
myguidingstar00:03:26

What is the setup for async dynamic resolver? I tried to make an async version of a working dynamic resolver, but the resolver seems to be executed only once and I don't know why

myguidingstar13:03:23

another question: I have this ident query [{[:a/id 1] [:a/x :a/y]}] against a dynamic resolver. But the first call to the function has env's :dispatch-key being :a/x while I expect it to be [:a/id 1] (meaning: one level up). Is that intended behavior? What's the recommended way to detect such case because I usually infer from :dispatch-key?

wilkerlucio16:03:41

there is a new data point in the reader3, which is :com.wsscode.pathom.connect.planner/node (on the env), this contains the planner data about the call, you should look into this instead of :ast

myguidingstar16:03:09

@wilkerlucio is there any util functions to convert an index-io to index-oir? (with a fixed resolver sym, of course)

wilkerlucio16:03:22

not possible, they may not match, and have different considerations, so you have to make each differently

wilkerlucio16:03:46

consider index-io is used only for auto-complete (which is important), but things should still work without it

myguidingstar17:03:10

I figured out I'd better stick to pc/add and have all indexes generated