At present, a field in an interface is stored in Dgraph using interfaceName.fieldName predicate, irrespective of which types implement that interface. That particular strategy solves a lot of problems with respect to interface handling in GraphQL on top of DQL.
For example, in your case, you have following schema:
interface IArtifact {
orkId: String! @search(by: [hash]) @id
...
}
type ScriptArtifact implements IArtifact {
arguments: [String!]!
inputs: [IObjectArtifact!] @hasInverse(field: inputOf)
output: [IObjectArtifact!] @hasInverse(field: outputOf)
}
The corresponding DQL schema would be:
type IArtifact {
IArtifact.orkId
...
}
IArtifact.orkId: string @index(hash) .
type ScriptArtifact {
ScriptArtifact.arguments
ScriptArtifact.inputs
ScriptArtifact.output
}
...
So, if there are multiple interfaces with the same field name and a type that implements all those interfaces, then there would be a problem: in which predicate to store the data for the type objects?
Example:
interface I1 {
f1: String
}
interface I2 {
f1: String
}
type T implements I1 & I2 {
f2: Int!
}
That means type T has only two fields f1 & f2. But, while adding data for type T, which predicate to use to store the data for f1: I1.f1 or I2.f1? That is a problem.
This is not a problem with ID, because that maps to uid in Dgraph, and so is not stored as a predicate.