@cuser/express-middleware-graphql
v0.0.36
Published
<p align="center"> <a href="./"><img width="250" src="https://raw.githubusercontent.com/rubeniskov/cuser/master/docs/logo.svg" alt="cuser logo" /></a> </p>
Downloads
22
Readme
@cuser/express-middleware-graphql
Status
mutation {
publishMessage(input: {
topicId: "RANDOM_TOPIC_CID",
content: {
data: "Message content"
},
user: {
peerId: "RANDOM_PEER_ID",
username: "exampleuser",
avatar: "https://www.w3schools.com/howto/img_avatar.png"
}
}) {
messageId
}
}
mutation {
updateMessage(input: {
topicId: "RANDOM_TOPIC_CID",
messageId: "message_id",
content: {
data: "Message content"
},
user: {
peerId: "RANDOM_PEER_ID",
username: "exampleuser",
avatar: "https://www.w3schools.com/howto/img_avatar.png"
}
}) {
messageId
}
}
mutation {
deleteMessage(input: {
topicId: "RANDOM_TOPIC_CID",
messageId: "message_id",
user: {
peerId: "RANDOM_PEER_ID",
username: "exampleuser",
avatar: "https://www.w3schools.com/howto/img_avatar.png"
}
})
}
References
- https://graphql.org/graphql-js/mutations-and-input-types/