Fork me on GitHub
#pathom
<
2023-01-15
>
robert-stuttaford11:01:22

@wilkerlucio i highly recommend adding a big notice to https://github.com/wilkerlucio/pathom readme to say that https://github.com/wilkerlucio/pathom3 exists and you should go there if you're starting with pathom 🙂 also, same thing but on the older doc site

âž• 12
sheluchin17:01:42

What is the right way to think about pbir/equivalence-resolver? If it creates a bi-directional transformation, doesn't that kind of imply that it's creating a cycle in the DAG?

wilkerlucio19:01:34

hello, good question, indeed they do create a cycle, but thats not really an issue, because pathom planner can detect the cycle and skip it, the idea of a bidirectional link is that in case you have one of the sides available, it can translate it into the other

wilkerlucio19:01:05

and to start from it, it could be some provided information, or getting resolved via some other resolver

sheluchin19:01:19

Hi @wilkerlucio. If I understand correctly, preventing cycles is important when creating and executing the plan, but it's fine to have cycles in the initial available graph?

wilkerlucio19:01:16

“preventing cycles is important”, not sure what you mean there

sheluchin19:01:27

Pathom has cycle detection, but is it also important to avoid creating cycles when writing resolvers?

wilkerlucio19:01:29

cycles will happen naturally, its not something you should require special attention

wilkerlucio19:01:19

reducing the number of paths for each attribute is encouraged since its gonna help keep paths clean, making planning / running faster

sheluchin19:01:03

Ah, so it's perfectly fine to have an a->b resolver and a b->a resolver.

wilkerlucio19:01:55

yup, in fact that is exactly what the equivalence resolver is, it makes two alias resolvers, one in each direction

sheluchin19:01:09

Okay, that simplifies my thinking. I thought it's necessary to pay special attention to make sure that your resolver graph remains a DAG - as in, being careful that you don't define cycles.

wilkerlucio19:01:47

no need, the planner will make sure cycles dont happen

wilkerlucio19:01:02

and the graph generated by the planner will always be a DAG

sheluchin19:01:51

tyvm @wilkerlucio, that clears it up for me.