I should use a_fixed_identifier as the subject of a N-quad record, so I try to mutate the database like this:
# <lianlian>: the fixed_identified that I want to use as a external id
# <type>: the predicate
# "product": a value object
curl -s -XPOST localhost:8080/mutate/25 -d '
{
set {
<lianlian> <type> "product" .
}
}
'
As of version 0.8 Dgraph doesn’t natively support such external IDs as node identifiers. Instead, external IDs can be stored as properties of a node with an xid edge. For example, from the above, the predicate names are valid in Dgraph, but the node identified with <http://schema.org/Person> could be identified in Dgraph with a UID, say 0x123 , and an edge
Dgraph will never identify <lianlian> as BlankNode or something valid.
As you can see at Get started with Dgraph
In the RDF format used by Dgraph the Entity will always represent a standard Dgraph entity identification. Be it a BlankNode or a UID (eg: 0x1a35).
This part of the Get started with Dgraph documentation is teaching how to use this xid as part of the Node itself. Not as a RDF markup identifier.
In other words, it is transforming this _: userA <http://schema.org/type> <http://schema.org/Person>.
into a node with UID ==> “0x123” or <0x123> <xid> "http://schema.org/Person".
It transforms the <http://schema.org/Person> into a Dgraph Node <0x123> <xid> "http://schema.org/Person".
After reading this https://docs.dgraph.io/v1.0.7/mutations/#external-ids carefully, I found that: it is the Dgraph’s input language RDF supports this form of external id: <a_fixed_identifier> <predicate> literal/node, which I misunderstood it as the form of Dgraph that it supports.