_:hamdi
Hamdi
name
23
age
_:ahmadi
_:muzakkiy
friend
friend
_:pet
pet
kitty
- Good for Analyze
- Good for Transactional
- Good when we want to know data relation
- Good when we want to know a very specific data ( fast )
- Easy to get relationship each data
- fast enough to get relationship data
- what you want, what you get ( graphql )
- should analyze the mutation well to avoid big changes in the future
- slow on insert
- slow when we search global data
Node
Value
( Attribute 1 )
Node
( Relationship )
Value
( Attribute 2 )
mutation {
schema {
name: string @index(exact, term) .
age: int @index(int) .
friend: uid @count .
}
}
mutation {
set {
_:naruto <name> "uzumaki naruto" .
_:naruto <child> _:boruto .
_:naruto <child> _:himawari .
_:naruto <job> "hokage" .
_:naruto <pet> _:gamabunta .
_:naruto <friend> _:sasuke .
_:naruto <friend> _:sakura .
_:naruto <teacher> _:kakashi .
_:boruto <father> _:naruto .
_:boruto <sister> _:himawari .
_:boruto <name> "uzumaki boruto" .
_:himawari <name> "himawari hyuga" .
}
}
{
everyone(func: anyofterms(name, "naruto")) {
name
child {
name
friend { expand(_all_) { expand(_all_) } }
}
}
}