Skip to content

Commit 83d8659

Browse files
adnanqaopsgitbook-bot
authored andcommitted
GITBOOK-197: How to Use Query Variables
1 parent 56fcc93 commit 83d8659

8 files changed

+16
-0
lines changed

docs/connect-your-data/query-basics/bind-query-data-to-components.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@ While developing, we often lose track the components where we have used the quer
3131

3232
<figure><img src="../../.gitbook/assets/frame_generic_light (1).png" alt=""><figcaption><p>Query Usage Display</p></figcaption></figure>
3333

34+
## How to Use Query Variables
35+
36+
Query Variables are unique variables and can be created in a Query or inside an Event Handler as shown in the following screenshots : \
37+
\
38+
![](<../../.gitbook/assets/Screenshot 2025-03-05 at 4.54.48 AM.png>)![](<../../.gitbook/assets/Screenshot 2025-03-05 at 4.53.55 AM.png>)
39+
40+
You can access the Query Variables as follow :&#x20;
41+
42+
1. Inside a JS Query, Query variables should be accessible by their names without the Handlebars as shown below : \
43+
\
44+
![](<../../.gitbook/assets/Screenshot 2025-03-05 at 5.09.28 AM.png>)![](<../../.gitbook/assets/Screenshot 2025-03-05 at 5.07.52 AM.png>)\
45+
46+
2. In any other Query type or anywhere in the App, Query variables should be accessible by their names within the Handlebars as shown below : \
47+
\
48+
![](<../../.gitbook/assets/Screenshot 2025-03-05 at 5.16.11 AM.png>)![](<../../.gitbook/assets/Screenshot 2025-03-05 at 5.13.03 AM.png>)![](<../../.gitbook/assets/Screenshot 2025-03-05 at 5.12.50 AM.png>)
49+
3450
## Transform data
3551

3652
You can leverage built-in JS functions and third-party libraries in `{{ }}` to transform data, such as `filter()`, `map()` and `reduce()` operations.

0 commit comments

Comments
 (0)