(sort: string[])
| 247 | } |
| 248 | |
| 249 | function validateSort(sort: string[]) { |
| 250 | for (const sortField of sort) { |
| 251 | const field = sortField.startsWith('-') ? sortField.slice(1) : sortField; |
| 252 | |
| 253 | if (extractFunctionName(field) === 'json') { |
| 254 | // throws InvalidQueryError on invalid json() syntax |
| 255 | parseJsonFunction(field); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | function validateRelationalDepth(query: Query) { |
| 261 | const maxRelationalDepth = Number(env['MAX_RELATIONAL_DEPTH']) > 2 ? Number(env['MAX_RELATIONAL_DEPTH']) : 2; |
no test coverage detected