TryGhost / NQL

MIT License
4 stars 8 forks source link

Refactor converter.js #14

Open kirrg001 opened 5 years ago

kirrg001 commented 5 years ago

Problem

We are currently adding support for filtering on relations.

With every case, the converter becomes:

Reasons

Goal

Try to add all relation cases and then refactor the converter.js. We should first learn from the use cases and see which refactoring direction makes sense.

I think what we need is a detection in the code base what this case is and then react on it. Currently, the converter.js is too generic, which makes it hard to deal with all the cases. IMO be explicit and more readable.