Moved from GitHub pydgraph/49
Posted by 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)