Replies: 1 comment
-
Hi @zmajew, currently, there is no raw way of doing this. But if you have defined structs, you can do something like this: type User struct {
UID string `json:"uid"`
... // other fields
Profile *Profile `json:"profile,omitempty"`
DType []string `json:"dgraph.type"`
}
type Profile struct {
UID string `json:"uid"`
... // other fields
DType []string `json:"dgraph.type"`
}
userProfile := User{
UID: "0x2798",
Profile: &Profile{
UID: "0x2797"
}
}
...
tx := dgman.NewTxnContext(ctx, c).SetCommitNow()
_, err := tx.Mutate(&userProfile) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thank you for the library!
I want to make the following mutation:
{
set {
<0x2798> <profile_of> <0x2797> ...
}
}
I did not find a way how to execute this query string.
Beta Was this translation helpful? Give feedback.
All reactions