Add facet

Moved from GitHub pydgraph/22

Posted by lapwat:

Hello,

How do you format the data to specify facets (=edge attributes) ? I would like to do something like (A)-distance=1->(B).

txn = client.txn()
data = ?
try:
  assigned = txn.mutate(set_obj=data)
  txn.commit()
finally:
  txn.discard()

Thanks a lot,
lapwat

gpahal commented :

You can have a look at the Mutation: Facet example in the docs.

lapwat commented :

Thank you very much sir.