Skip to content

Commit

Permalink
Arcade: pass params thru (#210)
Browse files Browse the repository at this point in the history
* Pass params thru

* RM log
  • Loading branch information
gksander authored Jul 31, 2023
1 parent b123950 commit bf32fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/arcade/ArcadeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const runCode = async ({
*/
const runQuery = async ({
query,
params,
dispatch,
}: {
query: q.BaseQuery<any>;
Expand All @@ -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 } });
Expand Down

1 comment on commit bf32fda

@vercel
Copy link

@vercel vercel bot commented on bf32fda Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

groqd – ./

groqd-formidable-labs.vercel.app
groqd-git-main-formidable-labs.vercel.app
groqd.vercel.app

Please sign in to comment.