i can no longer query for user with id 0x271f. but i did was just deleting predicate “with_role” but could not do it. do i need to commit or discard first?
i found out that, ive i mutate delete entire with_role predicate, and then tried to query for with_role only field, it will fail with record not found.
but if i try to query the same record which has no relationships within with_role, as stand alone, it works.
example query
query user() {
with_role {
uid
name
}
}
but i tried again the delete with_role predicate but this time, i added other field other than with_role on the query, it works!
Since I’m not a GoLang developer. I’m not sure what I can do to help. What I can help is to the limits of my knowledge and using existing examples. But maybe someone else can help. Digging the code is a good one, that’s what I do xD
There is more than one approach to performing a deletion “S P *” or “S * *” - But those recommended in the documentation are the ones indicated for this work.
i think i did the mutation delete for the predicate and it works properly.
but problem comes after the deletion, the query for with_roles return no record found.
but if i add in uid beside with_roles, and it works.
could this be a bug in dgo library?
Please, can you show the parameters used in the Query (at root)?
About this, everything you’ve reported here is normal. When you make an query requesting fields that no longer exist, the answer will obviously be empty.
this works when query, but did not work when i did mutation delete predicate with_role. but it works even after ive deleted if i query as standalone. return record not found if i delete and then query the same query (note, this is before commit , within the same transaction)
query user() {
with_role {
uid
name
}
}
but with this, it always works, no matter if i delete the predicate then query, or i did a fresh standalone query.
This query is wrong. Functions and parameters are missing.
The differences presented do not help me understand what is happening. Although by what you’ve presenting, if everything matches, you should get expected results. Only more information can enlighten the case.