Yes, sure. Sorry, I couldn’t come up with a shorter example.
I’m using latest master from yesterday (~20 hours ago)
Schema:
type User {
username: String! @id
password: String!
projects: [Project!] @hasInverse(field: owner)
}
type Project {
id: String! @id
owner: User!
name: String! @search(by: [hash])
datasets: [Dataset!] @hasInverse(field: project)
}
type Dataset {
id: String! @id
owner: User!
project: Project!
name: String! @search(by: [hash])
}
Create User:
mutation {
addUser(input:
[
{
username: "user"
password: "useruser"
}
]) {
user {
username
}
}
}
Add Project including one dataset (this fails):
mutation {
addProject(input:
[
{
id: "p1"
owner: {
username: "user"
}
name: "project"
datasets: [
{
id: "d1"
owner: {
username: "user"
}
name: "dataset"
}
]
}
]) {
project {
id
}
}
}
Error Message:
"message": "mutation addProject failed because Dgraph execution failed because Some variables are used but not defined\nDefined:[Dataset4 Project2 Project5 __dgraph__0]\nUsed:[Dataset4 Project2 Project5 User7 __dgraph__0]\n",
Edit Came up with a shorter example