Report a GraphQL Bug
What edition and version of Dgraph are you using?
Edition:
- Dgraph Cloud formerly Slash GraphQL
- Dgraph (community edition/Dgraph Cloud)
If you are using the community edition or enterprise edition of Dgraph, please list the version:
Dgraph Version: v20.11.2-rc1-16-g4d041a3a
Have you tried reproducing the issue with the latest release?
NA
Steps to reproduce the issue (paste the query/schema if possible)
interface Tag {
id: ID!
slug: String
name: String
# ...
}
type RelationshipCategory implements Tag {
usedIn: [Relationship] @hasInverse(field: "type")
# ...
}
type Relationship {
id: ID!
name: String
type: RelationshipCategory!
# ...
of: Contact
to: Contact
}
type Contact {
id: ID!
firstName: String
# ...
relationshipsTo: [Relationship] @hasInverse(field: "of")
relationshipsOf: [Relationship] @hasInverse(field: "to")
}
query {
queryRelationship(filter: { id: ["0x240013"] }) {
__typename
id
}
getRelationshipCategory(id: "0x225f22") {
id
usedIn(filter: {id:["0x240013"]}) {
__typename
id
}
}
}
Expected behaviour and actual result.
Expected: To see node with uid of 0x240013
in queryRelationship
if it exists such as the following
{
"data": {
"queryRelationship": [
{
"__typename": "Relationship",
"id": "0x240013"
}
],
"getRelationshipCategory": {
"id": "0x225f22",
"usedIn": [
{
"__typename": "Relationship",
"id": "0x240013"
}
]
}
},
// ...
Actual: Doesn’t return node 0x240013
in queryRelationship
response
{
"data": {
"queryRelationship": [],
"getRelationshipCategory": {
"id": "0x225f22",
"usedIn": [
{
"__typename": "Relationship",
"id": "0x240013"
}
]
}
},
// ...
DQL query:
{
node(func: uid(0x240013)) {
uid
expand(_all_)
}
}
Returns:
{
"data": {
"node": [
{
"uid": "0x240013"
}
]
},
// ...
Notice no dgraph.type
, and no other predicates for this node, which leads me to believe it was a node that was deleted but an edge to it still remains possibly??