Filter using FrontQL
Introduction
In web applications, filtering data based on specific values is a common requirement. FrontQL allows you to filter data using the filter
query parameter.
Implementing Filter
- Use the
filter
query parameter to specify the criteria. - If filter changes, the token has to be regenerated.
- It is passed to the headers of the request.
Example
Here’s a simple example of implementing filter using FrontQL:
In this example, the
filter
query parameter is used to specify that theusers
collection should be filtered by thename
field. The filter is done on thename
field in theusers
collection.