Only one node returned in two GraphQL variables query

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!

This don’t work for now. But we are adding support for it.

BTW

Expand all may not work if you define other predicates. Let only the expand all func over there.

What is this? value facet?

I use @facets(eq(asset,$asset)) to filter the facets, but it does not return facet values. I add another @facets to show all edge attributes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.