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

Incorrect types for Graph.query() params #83

Open
fabiankaestner opened this issue Oct 25, 2021 · 1 comment
Open

Incorrect types for Graph.query() params #83

fabiankaestner opened this issue Oct 25, 2021 · 1 comment

Comments

@fabiankaestner
Copy link

fabiankaestner commented Oct 25, 2021

The typescript type definitions for the query method force the params parameter to be a Map<any, any>, but the actual javascript function expects a dumb { [ key: string ]: any }.
Passing a Map causes the query to fail due to 'missing parameters', as expected.
Passing a normal JS object works, but requires typescript hacking like graph.query(query, params as unknown as Map<any, any>).
Am I missing something here or is this an actual error?

@JonasHiltl
Copy link

+1

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