docs/versioned_docs/version-2.12.0/app-builder/query-panel.md
The Query Panel is present at the bottom of the app-builder, this is where you create queries to interact with connected local and global datasources. You can perform API requests, query databases, or transform or manipulate data with JavaScript & Python.
The Query Panel has two sections:
Query Manager will list all the queries that has been created in the application. Query Manager is used to:
On the top of the query manager is search box that can be used to search for a specific query.
<div style={{textAlign: 'center'}}> </div>Add button is used to add more queries in the application. When Add button is clicked, the Query Editor will show you a list of options for creating a query from: Rest API, connected datasources, ToolJet Database, JavaScript Code, Python Code or Add a new datasource.
<div style={{textAlign: 'center'}}> </div>Delete button will delete the selected query, the button will only show up when you hover over the query name.
<div style={{textAlign: 'center'}}> </div>Edit button is used edit the name of the selected query, the button will only show up when you hover over the query name.
<div style={{textAlign: 'center'}}> </div>Query editor used to configure the query parameters, preview or transform the data return by the query.
<div style={{textAlign: 'center'}}> </div>On the top of the query panel there are a few options:
Edit the name of the query by clicking on the edit button next to the default query name.
<div style={{textAlign: 'center'}}> </div>Preview gives you a quick look at the data returned by the query without triggering the query in the app.
The Preview of data is returned in two different formats:
Raw
<div style={{textAlign: 'center'}}> </div>JSON
<div style={{textAlign: 'center'}}> </div>Save is used to save the changes whenever a change is made in query.
<div style={{textAlign: 'center'}}> </div>Run is used to trigger the query, running the query will interact with the application unlike Preview.
Query Parameters are the values required for the query to return a response from the server. Parameters include endpoints, methods, or operations. Query Parameters are different for each datasource.
<div style={{textAlign: 'center'}}> </div>Transformations can be enabled on queries to transform the query results. ToolJet allows you to transform the query results using two programming languages JavaScript & Python. Check the detailed documentation on Transformations.
<div style={{textAlign: 'center'}}> </div>Enabling this option will fire the query every time the app is loaded.
Enabling this option show a confirmation modal to confirm Yes or No if you want to fire that query.
Enabling this option show a success toast notification when the query is successfully triggered.
Event Handler are used to add some action when a particular event happens. You can add event handlers to the query for the following events:
:::info Learn more about Event Handlers and Actions. :::
<div style={{textAlign: 'center'}}> </div>If more than one datasources are connected of same type then you can change the datasource of the query from this dropdown.
<div style={{textAlign: 'center'}}> </div>