In the GraphQL specification 2.8.1 is stated that fragments can be specified on objects, interface and unions.
Unfortunately, Dgraph do not resolve fragments for interfaces, leading to errors in the query result
interface Meta {
id: String! @id @search(by: [hash])
}
interface Generic {
names: [String!]!
}
type Movie implements Meta & Generic {
description: String!
}
query {
getMeta(id:"NmU4YTRhODQ5") {
... on Generic {
names
}
}
}
=>
"message": "Cannot return null for non-nullable field Movie.names.",