* The fluent API makes that nested relations can be retrieved at once. It's a * helper for writing `select` statements on relations with a chaining api. * Because of this, we automatically add `select` statements to the query, that * also means that we need to provide a `dataPath` for unpacking n
(fluentPropName?: string, prevDataPath?: string[])
| 18 | * @returns |
| 19 | */ |
| 20 | function getNextDataPath(fluentPropName?: string, prevDataPath?: string[]) { |
| 21 | if (fluentPropName === undefined || prevDataPath === undefined) return [] |
| 22 | |
| 23 | return [...prevDataPath, 'select', fluentPropName] |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * @see {getNextDataPath} for introduction. The goal of the fluent API is to |