I try to use python client to make a query with two variables:
def query1(self,account,asset):
q = """
query txs($account : string, $asset: string){
me(func: eq(account, $account)) {
account
transfer @facets @facets(eq(asset,$asset)){
account
transfer @facets
expand(_all_)
}
}
}
"""
res = self.client.txn(read_only=True).query(q, variables=variables)
all_addresses = json.loads(res.json)
print(all_addresses)
dgraph_client.query1(“1.2.31”,“1.3.27”)
But it only returns {‘me’: [{‘account’: ‘1.2.31’}]}
However, the query with one variable works well. For example,
q = """
query txs($account : string){
me(func: eq(account, $account)) {
account
transfer @facets @facets(eq(asset,"1.3.27")){
expand(_all_)
}
}
}
"""
What is my problem? Thanks!