Skip to content

Search using FrontQL

Introduction

In web applications, it is common to search for specific data or information. FrontQL provides the ability to search for data using the search query parameter.

In FrontQL, search is a crucial component of data retrieval and search functionality. Search is used to find specific data or information in the database. The search query parameter is used to specify the search criteria and the results are returned based on the search query.

  • The search query parameter is used to specify the search criteria.
  • The results are returned based on the search query.
  • It is passed to the params of the request.
  • If search changes, no need to regenerate the token.

Example

Here’s a simple example of implementing search using FrontQL:

async function getUsers() {
const response = await Api.get("/users", {
search: "name:John",
});
return response;
}

This will return us all users with the name “John”.