Hey, I’m making a chat app and when sending a message, I need to provide a CeramicStreamID as a profileId field… tried to provide the userProfile id, but got the error that’s it’s a model ID and not the stream one…
here’s my message model
type MyBasicProfile @loadModel(id: "kjzl6hvfrbw6c6ieqa2ux93xs3oehvmumgg1x95s6tyionswg1cpyh777x8pmol") {
id: ID!
}
type Message @createModel(accountRelation: LIST, description: "A message") {
Message: String! @string(minLength: 1, maxLength: 400)
edited: DateTime
sent: DateTime!
profileID: StreamID! @documentReference(model: "MyBasicProfile")
profile: MyBasicProfile! @relationDocument(property: "profileID")
}
and here’s the mutation I’m trying to make
const mutation = await composeClient.executeQuery(`
mutation {
createMessage(input: {
content: {
Message: "${message}"
sent: "${new Date().toISOString()}"
profileID: "CeramicStreamID NEEDED"
}
})
{
document {
Message
sent
profileID
}
}
}
`);
Could you please give a hint on how to do it properly? Thanks