Progress
The last week and a bit more have been insane in terms of being away from writing - be it code, or a note. So, amidst a long “get to know the product” session from the founder, sat down improving the GraphQL sanitiser.
Added a couple of changes from the earlier work that went kaput thanks to a ‘well thought out’ rm -rf on my desktop. First, an opt-in extension on the Express JS router to provide a simpler way to expose data schemas for any controller-model pair. Given it is opt-in and a question of data classes being exported by a model module, flexible enough for generic usage.
Second, and most importantly in the earlier context, a helper function on top of the reflection to prevent querying on non-indexed fields. For the current time, it throws an error, which seems a sensible default. Configuration based warning in place of throwing, not very sure.