Hi, so I have read the documentation on https://dgraph.io/docs/v1.0.7/mutations/#external-ids, which more describes their technical usage. To take a step back, can u please help me understand why someone would use in first place?
So I get the premise, that for a given node we want to model may already has an identifier from another system that we want to reuse. Also, for dgraph nodes we must always use a uid. So let us say my (external) identifier is called fooId, what are the pros / cons of modelling fooId as a “regular” indexed attribute on the “foo” node vs implementing as an external Id? What I am so far deducing from the above linked documentation:
- its more convenient for build queries using xid
- its more involved to implement an xid
Q. Does xid help/force node uniqueness?
As a followup question, (re point 2 above), I have so far being using Java with JSON (as opposed to RDF) for my dgraph mutations. Could I get a tip on how to implement xid? (For a facet, the following works nice)