parseFilter
parseFilter(
source,limits?):FilterParse
Defined in: packages/schema/src/filter/parse.ts:38
Parses filter text, AIP-160 as the API takes it, into a filter, collecting every error. maxLength defaults to
10,000 characters and maxDepth to 64. Check the result against a resource with checkFilter before running it.
Parameters
Section titled “Parameters”source
Section titled “source”string
limits?
Section titled “limits?”FilterLimits = {}
Returns
Section titled “Returns”Example
Section titled “Example”const parsed = parseFilter('status = "paid" AND total > 100')if (parsed.ok && parsed.ast) printFilter(parsed.ast) // 'status = "paid" AND total > 100'