Postgres: Filter Using Text Values
operators are used for pattern matching on string/text fields.
For more details on text search operators and Postgres equivalents, refer to the API reference.
Fetch a list of articles whose titles contain the word “amet”:
This query will return all users whose name contains the string "john", regardless of case.
This query would return all users whose name does not contain the string "John".
_like is case-sensitive. Use
_ilike for case-insensitive search.
Fetch a list of authors whose names begin with A or C:
Fetch a list of authors whose names do not begin with A or C:
_nsimilar are case-sensitive.
Fetch a list of articles whose titles match the regex
This query will return all users whose name matches the regular expression
/^joh?n$/i, which matches "John" and "Jon".
The _nregex operator in this GraphQL query is a negated regular expression filter that matches all users whose names do not start with the letter "J".
_regex is case-sensitive. Use
_iregex for case-insensitive search.
regex operators are supported in in
v2.0.0 and above