Delete API
Introduction
FrontQL is a lightweight front-end querying language designed to streamline client-server communication for web applications. It simplifies data deletion by allowing clients to send exactly what they need to the server. One of the key features of FrontQL is its DELETE API, which enables clients to delete data on the server using HTTP DELETE requests.
The DELETE API of FrontQL is based on a structured query language that is both powerful and easy to understand. When a client makes a DELETE request to a FrontQL-enabled server, it includes a query parameter that specifies the fields and objects to be deleted. The server then processes this query and deletes the requested data.
By using the DELETE API of FrontQL, developers can reduce the amount of data transferred over the network, minimize the need for multiple API endpoints, and ensure that applications are more performant and scalable.
Example
Here’s a simple example of a FrontQL DELETE API request:
Output
This example deletes the user with ID 1
from the server.
Multiple Deletes
- It is possible to delete multiple objects in a single request.
- Simply passing an array of objects to the
body
parameter is enough. - The
id
field is required in each object. - Example: