From d384bf9d7dcdd864a022578454b27ba0f83b921d Mon Sep 17 00:00:00 2001 From: bniwredyc Date: Sun, 7 May 2023 17:23:48 +0200 Subject: [PATCH] api changes --- src/graphql/mutation/article-destroy.ts | 4 ++-- src/graphql/mutation/article-publish.ts | 4 ++-- src/graphql/mutation/article-update.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/graphql/mutation/article-destroy.ts b/src/graphql/mutation/article-destroy.ts index 607a5a5c..918b4451 100644 --- a/src/graphql/mutation/article-destroy.ts +++ b/src/graphql/mutation/article-destroy.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - mutation DeleteShoutMutation($shout: String!) { - deleteShout(slug: $shout) { + mutation DeleteShoutMutation($shoutId: Int!) { + deleteShout(shout_id: $shoutId) { error } } diff --git a/src/graphql/mutation/article-publish.ts b/src/graphql/mutation/article-publish.ts index 4e83fe44..dd1bc126 100644 --- a/src/graphql/mutation/article-publish.ts +++ b/src/graphql/mutation/article-publish.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - mutation PublishShoutMutation($slug: String!) { - publishShout(slug: $slug) { + mutation PublishShoutMutation($shoutId: Int!, $shoutInput: ShoutInput) { + publishShout(shout_id: $shoutId, shout_input: $shoutInput) { error shout { id diff --git a/src/graphql/mutation/article-update.ts b/src/graphql/mutation/article-update.ts index e4e701e6..38756226 100644 --- a/src/graphql/mutation/article-update.ts +++ b/src/graphql/mutation/article-update.ts @@ -2,7 +2,7 @@ import { gql } from '@urql/core' export default gql` mutation UpdateShoutMutation($shoutId: Int!, $shoutInput: ShoutInput!) { - updateShout(shoutId: $shoutId, shoutInput: $shoutInput) { + updateShout(shout_id: $shoutId, shout_input: $shoutInput) { error shout { id