example schema that should reproduce (If you need full schema let me know)
type Contact {
id: ID!
name: String
hasTasks: [Task] # tasks that need to be done to this contact
hasToDos: [Task] # tasks that this contact needs to do
}
type Task {
id: ID!
name: String!
occurrances: [TaskOccurance] @hasInverse(field: task)
forContact: Contact @hasInverse(field: hasTasks)
designated: Contact @hasInverse(field: hasToDos)
}
type TaskOccurance { # broken out of Tasks that way a single task can be recurring
id: ID!
task: Task @hasInverse(field: occurrances)
due: DateTime
comp: DateTime
}
Now my query, I want to get contacts and the tasks that need to be done for them, and the tasks that they have to do.
query {
queryContact {
id
name
hasTasks {
id
name
occurrances {
due
comp
}
}
hasToDos {
id
name
occurrances {
due
comp
}
}
}
}
which resulted in the following error:
Dgraph query failed because Dgraph execution failed because Some variables are used but not defined\nDefined:[]\nUsed:[TaskOccurance1 TaskOccurance2]
This is all valid schema and should be an acceptable query even without any data present.
I created this schema on an empty dgraph instance and then ran your query. It didn’t fail for me but of course there was no data in results because I hadn’t added any.
If you have added some data post which this is happening, please share the data mutation query as well. I will try to replicate.
@arijit, I am getting this error on a consistent basis now with multiple different queries. Happens more often with deeply nested queries. Any results back yet on a resolution? Were you able to duplicate it with the JWT I sent you in a PM?
Can this get pulled into Slash. I am having this error repeatedly. Or, if this has already been pulled into Slash, can you let me know so that I can raise new similar issue.
This is preventing some of my @auth directive rules from being ran until this gets fixed, so an urgency would be appreciated.