I have a very simple model with post
that embeds several comments
I wondered how I should do a mutation to add a new comment
to the post
As I already have queries defined to get back a post
with a given id
, I wanted to try to have the following mutation syntax working
mutation {
post(id: "57334cdcb6d7fb172d4680bb") {
addComment(data: {
text: "test comment"
})
}
}
but I can't seem to find a way to make it work. Even if I'm in a mutation, output type being a post
addComment is seen as a field post
should have.
Do you guys have any idea ?
Thanks