use mutation query

This commit is contained in:
Jonas Leder 2022-04-07 09:12:38 +02:00
parent aa670a0512
commit a6a470f8aa

View file

@ -105,7 +105,7 @@ class newComment extends HTMLElement {
}
var graphql = JSON.stringify({
query: 'query($article: String!, $name: String!, $hCaptchaResponse: String!, $email: String!, $comment: String!) { newComment(article: $article, name: $name, email: $email, comment: $comment, hCaptchaResponse: $hCaptchaResponse)}',
query: 'mutation($article: String!, $name: String!, $hCaptchaResponse: String!, $email: String!, $comment: String!) { newComment(article: $article, name: $name, email: $email, comment: $comment, hCaptchaResponse: $hCaptchaResponse)}',
variables: {
"article": pageName,
"name": nameInput.value,