JCzz
(J Czz)
December 3, 2019, 9:03pm
1
I can delete edge predicates:
POST http://{{host}}/mutate?commitNow=true
Content-Type: application/json
{
"delete": [
{
"uid": "0x56",
"follows": [
{
"uid": "0x55"
}
]
}
]
}
But not the node itself:
POST http://{{host}}/mutate?commitNow=true
Content-Type: application/json
{
"delete": [
{
"uid": "0x56"
}
]
}
Using RDF is working:
POST http://{{host}}/mutate?commitNow=true
Content-Type: application/rdf
{
delete {
<0x56> <name> * .
}
}
MichelDiz
(Michel Diz)
December 3, 2019, 9:57pm
2
JCzz
(J Czz)
December 4, 2019, 8:40am
3
The node was created with:
POST http://{{host}}/mutate?commitNow=true
Content-Type: application/json
{
"set": [
{
"name": "Alice"
},
{
"name": "Bob"
}
]
}
No I did not specify the schema myself, it was done by dgraph - I dont know the name for this process where dgraph automatically creates the node and the schema?
The schema is: Preedicate: name, Type: string, and no Indices.
MichelDiz
(Michel Diz)
December 4, 2019, 3:45pm
4
Do this:
curl -X POST localhost:8080/alter -d \
'name: string @index(term) .
type Person {
name: String
}'
But add the type in the mutation
{
"set": [
{
"name": "Alice",
"dgraph.type": "Person"
},
{
"name": "Bob",
"dgraph.type": "Person"
}
]
}
system
(system)
Closed
January 3, 2020, 3:45pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.