hi
sth wrong maybe in the docs or in my head ahaha here’s the model
`type MyBasicProfile @loadModel(id: "kjzl6hvfrbw6c5h819h92gaycwy34hnbnw8dioz63xaa6n74odkf1z3krl8fpdn") {
id: ID!
}
type DMMessage @createModel(accountRelation: LIST, description: "Direct message model") {
recipient: DID! @accountReference
directMessage: String! @string(minLength: 1, maxLength: 200)
sent: DateTime!
profileID: StreamID! @documentReference(model: "MyBasicProfile")
profile: MyBasicProfile! @relationDocument(property: "profileID")
}`
now when I want to send a direct message which I do like this
` mutation {
createDMMessage(input: {
content: {
directMessage: "${privateMessage}"
sent: "${new Date().toISOString()}"
profileID: "${profile.id}"
recipient: "${privateMessageRecipientID}"
}
})
{
document {
directMessage
sent
profileID
recipient
}
}
}`
I get an error Field "recipient" of type "CeramicAccount!" must have a selection of subfields. Did you mean "recipient { ... }"?
ok, then I change the mutation to this
`mutation {
createDMMessage(input: {
content: {
directMessage: "${privateMessage}"
sent: "${new Date().toISOString()}"
profileID: "${profile.id}"
recipient:{
id: "${privateMessageRecipientID}"
}
}
})
{
document {
directMessage
sent
profileID
recipient{
id
}
}
}
}`
I get another error Can only validate strings as DID but got a: ObjectValue
so… my model looks similar to the one in the docs
what do I do wrong then? how do I assign the recipien correctly? thank you