From bf32fda6d1f40dbf7cdc44e10805ac32f43017c7 Mon Sep 17 00:00:00 2001 From: Grant Sander Date: Mon, 31 Jul 2023 15:10:12 -0500 Subject: [PATCH] Arcade: pass params thru (#210) * Pass params thru * RM log --- website/src/arcade/ArcadeEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/arcade/ArcadeEditor.tsx b/website/src/arcade/ArcadeEditor.tsx index 215182a1..11ad289e 100644 --- a/website/src/arcade/ArcadeEditor.tsx +++ b/website/src/arcade/ArcadeEditor.tsx @@ -177,6 +177,7 @@ const runCode = async ({ */ const runQuery = async ({ query, + params, dispatch, }: { query: q.BaseQuery; @@ -194,9 +195,8 @@ const runQuery = async ({ throw new Error("Error parsing dataset JSON"); } - // TODO: Handle params... const runner = q.makeSafeQueryRunner(async (query: string) => { - const tree = parse(query); + const tree = parse(query, { params }); const _ = await evaluate(tree, { dataset: json }); const rawResponse = await _.get(); dispatch({ type: "RAW_RESPONSE_RECEIVED", payload: { rawResponse } });