From 3c9db8b19819c9530fe9c86ce105443fdb79f996 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Mon, 5 Dec 2022 12:19:13 +0300 Subject: [PATCH] update api --- src/graphql/mutation/follow.ts | 2 +- src/graphql/mutation/unfollow.ts | 2 +- src/graphql/types.gen.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/graphql/mutation/follow.ts b/src/graphql/mutation/follow.ts index ef8c20b1..5121ece2 100644 --- a/src/graphql/mutation/follow.ts +++ b/src/graphql/mutation/follow.ts @@ -1,7 +1,7 @@ import { gql } from '@urql/core' export default gql` - mutation FollowQuery($what: String!, $slug: String!) { + mutation FollowQuery($what: FollowingEntity!, $slug: String!) { follow(what: $what, slug: $slug) { error } diff --git a/src/graphql/mutation/unfollow.ts b/src/graphql/mutation/unfollow.ts index 2da84c56..b5edced9 100644 --- a/src/graphql/mutation/unfollow.ts +++ b/src/graphql/mutation/unfollow.ts @@ -1,7 +1,7 @@ import { gql } from '@urql/core' export default gql` - mutation UnfollowQuery($what: String!, $slug: String!) { + mutation UnfollowQuery($what: FollowingEntity!, $slug: String!) { unfollow(what: $what, slug: $slug) { error } diff --git a/src/graphql/types.gen.ts b/src/graphql/types.gen.ts index 5dd514cf..64a2d200 100644 --- a/src/graphql/types.gen.ts +++ b/src/graphql/types.gen.ts @@ -78,6 +78,7 @@ export type ChatMember = { id: Scalars['Int'] lastSeen?: Maybe name: Scalars['String'] + online?: Maybe slug: Scalars['String'] userpic?: Maybe } @@ -139,7 +140,7 @@ export type LoadShoutsOptions = { } export type Message = { - author: Scalars['String'] + author: Scalars['Int'] body: Scalars['String'] chatId: Scalars['String'] createdAt: Scalars['Int']