Query all records by custom filter

Hey guys, I have a question about the best configuration for the custom filters if I want to support 2 different query parameters (mutually exclusive) on an API to filter the collection result from an All Records query.

For example if I wanted an API to support something like:
/[email protected] OR
/accounts?phone=4151234567

Reading the docs it seems you would add both email and phone as input on the function stack and then configure the Query All Records with custom filter to something like this:

db:accounts.email = input: email    OR
db:accounts.phone = input: phone

But in this configuration the filters don't seem to be honored when there are two present with the OR operator. Removing one of them works for that single filter but unfortunately a no query param API call (ie. /accounts ) returns an empty array even though the input value are marked as not required. 

Am I misunderstanding the OR operator and default behavior of the custom filters in the event that no input values are presented - I was hoping the result would be like a stand Query All Records with custom filters essentially disabled.
Other
2 replies