From de9e7dea6a11dd5ea0ecdbd3650aba5522a581a0 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Thu, 31 Oct 2024 01:56:34 -0600 Subject: [PATCH] Return id for cache; --- src/index.tsx | 34 ++++++++++++++++++++++++++++++---- src/operations/user.gql | 7 +++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 211b211..2a80430 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3182,8 +3182,17 @@ export type FollowUserMutation = { followUser: { __typename?: "UserGQL"; username: string; - following?: Array<{ __typename?: "UserGQL"; id: number }> | null; - followers?: Array<{ __typename?: "UserGQL"; id: number }> | null; + id: number; + following?: Array<{ + __typename?: "UserGQL"; + id: number; + username: string; + }> | null; + followers?: Array<{ + __typename?: "UserGQL"; + id: number; + username: string; + }> | null; }; }; @@ -3196,8 +3205,17 @@ export type UnfollowUserMutation = { unfollowUser: { __typename?: "UserGQL"; username: string; - following?: Array<{ __typename?: "UserGQL"; id: number }> | null; - followers?: Array<{ __typename?: "UserGQL"; id: number }> | null; + id: number; + following?: Array<{ + __typename?: "UserGQL"; + id: number; + username: string; + }> | null; + followers?: Array<{ + __typename?: "UserGQL"; + id: number; + username: string; + }> | null; }; }; @@ -3209,6 +3227,7 @@ export type GetUserFollowingFollowersQuery = { __typename?: "Query"; getLoggedInUser?: { __typename?: "UserGQL"; + id: number; following?: Array<{ __typename?: "UserGQL"; id: number; @@ -5365,11 +5384,14 @@ export const FollowUserDocument = gql` mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { username + id following { id + username } followers { id + username } } } @@ -5421,11 +5443,14 @@ export const UnfollowUserDocument = gql` mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { username + id following { id + username } followers { id + username } } } @@ -5476,6 +5501,7 @@ export type UnfollowUserMutationOptions = Apollo.BaseMutationOptions< export const GetUserFollowingFollowersDocument = gql` query getUserFollowingFollowers { getLoggedInUser { + id following { id username diff --git a/src/operations/user.gql b/src/operations/user.gql index be6ba7f..a621549 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -91,11 +91,14 @@ query GetUserTags { mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { username + id following { id + username } followers { id + username } } } @@ -103,17 +106,21 @@ mutation followUser($followedUserId: Int!) { mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { username + id following { id + username } followers { id + username } } } query getUserFollowingFollowers { getLoggedInUser { + id following { id username -- 2.46.1