From 05e3182e8b09a2dfdeccfda82bd72ed6be6922e8 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Wed, 30 Oct 2024 18:20:25 -0600 Subject: [PATCH] Use logged in user for followers --- src/index.tsx | 11 +++++------ src/operations/user.gql | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 74bf86a..211b211 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3202,12 +3202,12 @@ export type UnfollowUserMutation = { }; export type GetUserFollowingFollowersQueryVariables = Exact<{ - userId: Scalars["Int"]["input"]; + [key: string]: never; }>; export type GetUserFollowingFollowersQuery = { __typename?: "Query"; - getUser?: { + getLoggedInUser?: { __typename?: "UserGQL"; following?: Array<{ __typename?: "UserGQL"; @@ -5474,8 +5474,8 @@ export type UnfollowUserMutationOptions = Apollo.BaseMutationOptions< UnfollowUserMutationVariables >; export const GetUserFollowingFollowersDocument = gql` - query getUserFollowingFollowers($userId: Int!) { - getUser(userId: $userId) { + query getUserFollowingFollowers { + getLoggedInUser { following { id username @@ -5500,12 +5500,11 @@ export const GetUserFollowingFollowersDocument = gql` * @example * const { data, loading, error } = useGetUserFollowingFollowersQuery({ * variables: { - * userId: // value for 'userId' * }, * }); */ export function useGetUserFollowingFollowersQuery( - baseOptions: Apollo.QueryHookOptions< + baseOptions?: Apollo.QueryHookOptions< GetUserFollowingFollowersQuery, GetUserFollowingFollowersQueryVariables >, diff --git a/src/operations/user.gql b/src/operations/user.gql index 832afe6..be6ba7f 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -112,8 +112,8 @@ mutation unfollowUser($followedUserId: Int!) { } } -query getUserFollowingFollowers($userId: Int!) { - getUser(userId: $userId) { +query getUserFollowingFollowers { + getLoggedInUser { following { id username