From 148f5362f02601857c5266088e96d7f5d4a0a6de Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 29 Oct 2024 15:46:16 -0600 Subject: [PATCH] Followers and following --- src/index.tsx | 26 ++++++++++++++++++++++++-- src/operations/user.gql | 12 ++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index b866242..43d622a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3173,7 +3173,12 @@ export type FollowUserMutationVariables = Exact<{ export type FollowUserMutation = { __typename?: "Mutation"; - followUser: { __typename?: "UserGQL"; username: string }; + followUser: { + __typename?: "UserGQL"; + username: string; + following?: Array<{ __typename?: "UserGQL"; id: number }> | null; + followers?: Array<{ __typename?: "UserGQL"; id: number }> | null; + }; }; export type UnfollowUserMutationVariables = Exact<{ @@ -3182,7 +3187,12 @@ export type UnfollowUserMutationVariables = Exact<{ export type UnfollowUserMutation = { __typename?: "Mutation"; - unfollowUser: { __typename?: "UserGQL"; username: string }; + unfollowUser: { + __typename?: "UserGQL"; + username: string; + following?: Array<{ __typename?: "UserGQL"; id: number }> | null; + followers?: Array<{ __typename?: "UserGQL"; id: number }> | null; + }; }; export type GetStreamMonitoringDetailsQueryVariables = Exact<{ @@ -5319,6 +5329,12 @@ export const FollowUserDocument = gql` mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { username + following { + id + } + followers { + id + } } } `; @@ -5369,6 +5385,12 @@ export const UnfollowUserDocument = gql` mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { username + following { + id + } + followers { + id + } } } `; diff --git a/src/operations/user.gql b/src/operations/user.gql index 1a19ba6..bf04f9c 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -91,11 +91,23 @@ query GetUserTags { mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { username + following { + id + } + followers { + id + } } } mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { username + following { + id + } + followers { + id + } } }