Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on docs #190

Closed
arunanksharan opened this issue May 18, 2024 · 0 comments
Closed

Issue on docs #190

arunanksharan opened this issue May 18, 2024 · 0 comments

Comments

@arunanksharan
Copy link

Path: /api-reference/overview/sdks

Code:
const params = {
query_parameters = [
QueryParameter.text("TextField", "Plain Text"),
QueryParameter.number("NumberField", 3.1415926535),
QueryParameter.date("DateField", "2022-05-04 00:00:00"),
QueryParameter.enum("ListField", "Option 1"),
]
};

Issues:

  1. Syntactically incorrect - the '=' after query_parameters gives the following error: "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."

Code:
client
.runQuery(queryID, params)

  1. Error: Expected 1 arguments, but got 2.

The code appears to have been updated to :
client
.runQuery({ queryId, query_parameters })
.then((response) => console.log(response.result?.rows));

Reference: https://github.com/bh2smith/demo-ts-dune-client/blob/main/src/index.ts

@mewwts mewwts closed this as completed Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants