Skip to content

None string parameters get ignored #49

@Jamie-Chang

Description

@Jamie-Chang

It looks like util.is_string is used to check parameter key and value, but if either are not strings then the query will still be sent with the parameter ignored.

This makes it really hard to debug if the parameter value was accidentally set to something other than a string.

Instead it'll be a lot better if an error was thrown in this situation.

For example

        query = """
            query node($a: int) {
                node(func: eq(myid, $a))
                {
                    expand(_all_)
                }
            }
        """
        variables = {"$a": 1234}
        result = txn.query(query, variables=variables)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions