Skip to content

Incorrect types for Graph.query() params #83

@fabiankaestner

Description

@fabiankaestner

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions