How to add facets using python


(abbass) #1

Hello guys
i’m tired, i don’t know how to add facets using python client
help me pls


(Daniel Mai) #2

You can use the JSON mutation format for facets: https://docs.dgraph.io/mutations/#facets

{
  "predicate|facet": "value"
}

(abbass) #3

it works for me, thanks u :grinning:


(Adam Hopkins) #4

I know this is quite old, and I am really not trying to do self-promotion here… but pydiggy supports adding facets in a Python client.