From 3bcdfa582c78db18082ae129a795aae1fc5aaa57 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Sun, 23 Oct 2022 17:16:42 +0300 Subject: [PATCH] gql-todos --- src/graphql/mutation/article-create.ts | 5 ++--- src/graphql/mutation/article-destroy.ts | 5 ++--- src/graphql/mutation/article-update.ts | 4 ++-- src/graphql/mutation/reaction-create.ts | 2 -- src/graphql/mutation/reaction-destroy.ts | 1 - src/graphql/mutation/reaction-update.ts | 2 -- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/graphql/mutation/article-create.ts b/src/graphql/mutation/article-create.ts index 4698747f..be5a58e6 100644 --- a/src/graphql/mutation/article-create.ts +++ b/src/graphql/mutation/article-create.ts @@ -1,10 +1,9 @@ import { gql } from '@urql/core' -// TODO: sync with backend export default gql` - mutation ArticleMutation($article: Shout!) { - createArticle(article: $article) { + mutation CreateShoutMutations($shout: ShoutInput!) { + createShout(input: $shout) { error shout { _id: slug diff --git a/src/graphql/mutation/article-destroy.ts b/src/graphql/mutation/article-destroy.ts index 2dd44fbb..d99f8081 100644 --- a/src/graphql/mutation/article-destroy.ts +++ b/src/graphql/mutation/article-destroy.ts @@ -1,10 +1,9 @@ import { gql } from '@urql/core' -// TODO: sync with backend export default gql` - mutation ArticleMutation($article_id: Int!) { - destroyArticle(article: $article_id) { + mutation DeleteShoutMutation($shout: String!) { + deleteShout(slug: $shout) { error } } diff --git a/src/graphql/mutation/article-update.ts b/src/graphql/mutation/article-update.ts index 5c5b4a91..f8c09b58 100644 --- a/src/graphql/mutation/article-update.ts +++ b/src/graphql/mutation/article-update.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - mutation ArticleMutation($article: Shout!) { - updateArticle(article: $article) { + mutation UpdateShoutMutation($shout: Shout!) { + updateShout(input: $shout) { error shout { _id: slug diff --git a/src/graphql/mutation/reaction-create.ts b/src/graphql/mutation/reaction-create.ts index df1f2cc1..253d43f9 100644 --- a/src/graphql/mutation/reaction-create.ts +++ b/src/graphql/mutation/reaction-create.ts @@ -1,7 +1,5 @@ import { gql } from '@urql/core' -// TODO: sync with backend - export default gql` mutation CreateReactionMutation($reaction: ReactionInput!) { createReaction(reaction: $reaction) { diff --git a/src/graphql/mutation/reaction-destroy.ts b/src/graphql/mutation/reaction-destroy.ts index 2530fa29..082ea8ed 100644 --- a/src/graphql/mutation/reaction-destroy.ts +++ b/src/graphql/mutation/reaction-destroy.ts @@ -1,6 +1,5 @@ import { gql } from '@urql/core' -// TODO: sync with backend export default gql` mutation DeleteReactionMutation($id: Int!) { diff --git a/src/graphql/mutation/reaction-update.ts b/src/graphql/mutation/reaction-update.ts index df89572b..325e96e8 100644 --- a/src/graphql/mutation/reaction-update.ts +++ b/src/graphql/mutation/reaction-update.ts @@ -1,7 +1,5 @@ import { gql } from '@urql/core' -// TODO: sync with backend - export default gql` mutation UpdateReactionMutation($reaction: ReactionInput!) { updateReaction(reaction: $reaction) {