In my schema, Characters can have one or more works. I represented this with an array works: [Work]
field for the Character
type.
type Character {
charId: String! @id
works: [Work]
}
type Work {
workId: String! @id
characters: [Character] @hasInverse(field: works)
}
When I try to feed data in RDF format, I get an error:
Input for predicate "Character.works" of type uid is scalar. Edge: entity:650005 attr:"Character.works" value:"muchado"
Here’s the sample RDF data:
_:Character.leonato <Character.abbrev> "LEONATO" .
_:Character.leonato <Character.works> "muchado" .
_:Work.muchado <Work.workId> "muchado" .
I need an array of works [Work]
because some characters have multiple works:
_:Character.antony <Character.works> "juliuscaesar" .
_:Character.antony <Character.works> "antonycleo" .
What’s gone wrong here?