Direct message recipient DID

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

Image

what do I do wrong then? how do I assign the recipien correctly? thank you

@0x69A - try this out:

mutation {
        createDMMessage(input: {
          content: {
            directMessage: "${privateMessage}"
            sent: "${new Date().toISOString()}"
            profileID: "${profile.id}"
            recipient: "${privateMessageRecipientDID}" #the DID of your recipient
          }
        })
        {
          document {
            directMessage
            sent
            profileID
            recipient{
              id
            }
          }
        }
      }

now the error is
Value is not a valid DID: k2t6wzhkhabz0pk25ndf5z40w8...

ehm… but… if I’m the logged in user, how can I get another user DID?

I guess a much easier way just to use String and pass the another user profile id then))