I am trying to pull multiple UID via DQL with Python.
I’m not having much luck and I tried many different approaches.
This is what I currently have.
def get_games(self):
games = {'$games': "[0x1fbd2, 0x1fbd4]"}
query = """
query games($games: string) {
query (func: uid($games)) {
uid
Game.start_date
Game.end_date
}
}
"""
try:
txn = self.dgraph_client.txn()
response = txn.query(query=query, variables=games)
return json.loads(response.json)['games']
except Exception as e:
log.error(e)
finally:
txn.discard()