diff --git a/src/index.tsx b/src/index.tsx index ced217a..2e4efd5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3178,6 +3178,7 @@ export type UserGql = { following?: Maybe>; id: Scalars["Int"]["output"]; isAdmin?: Maybe; + isFollowedByCurrentUser?: Maybe; profileImageUri?: Maybe; stripeCustomerId?: Maybe; updatedAt?: Maybe; @@ -3227,16 +3228,25 @@ export type VideoFeedInputGql = | { allUsers: Scalars["Boolean"]["input"]; followedByUserId?: never; + home?: never; userId?: never; } | { allUsers?: never; followedByUserId: Scalars["Int"]["input"]; + home?: never; userId?: never; } | { allUsers?: never; followedByUserId?: never; + home: Scalars["Boolean"]["input"]; + userId?: never; + } + | { + allUsers?: never; + followedByUserId?: never; + home?: never; userId: Scalars["Int"]["input"]; }; @@ -3536,12 +3546,7 @@ export type GetFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; comments: Array<{ @@ -3553,12 +3558,7 @@ export type GetFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; replies: Array<{ __typename?: "CommentGQL"; @@ -3569,12 +3569,7 @@ export type GetFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; }>; @@ -3592,12 +3587,7 @@ export type UserSocialsFieldsFragment = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; export type VideoCardFieldsFragment = { @@ -3654,12 +3644,7 @@ export type VideoCardFieldsFragment = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; comments: Array<{ @@ -3671,12 +3656,7 @@ export type VideoCardFieldsFragment = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; replies: Array<{ __typename?: "CommentGQL"; @@ -3687,12 +3667,7 @@ export type VideoCardFieldsFragment = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; }>; @@ -3711,6 +3686,7 @@ export type GetVideoFeedQuery = { __typename?: "Query"; getFeedVideos: { __typename?: "VideoHistoryGQL"; + hasFollowing: boolean; videos: Array<{ __typename?: "VideoGQL"; id: number; @@ -3768,12 +3744,7 @@ export type GetVideoFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; comments: Array<{ @@ -3785,12 +3756,7 @@ export type GetVideoFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; replies: Array<{ __typename?: "CommentGQL"; @@ -3801,12 +3767,7 @@ export type GetVideoFeedQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; }>; @@ -4973,21 +4934,7 @@ export type FollowUserMutationVariables = Exact<{ export type FollowUserMutation = { __typename?: "Mutation"; - followUser: { - __typename?: "UserGQL"; - username: string; - id: number; - following?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - }> | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - }> | null; - }; + followUser: { __typename?: "UserGQL"; id: number; username: string }; }; export type UnfollowUserMutationVariables = Exact<{ @@ -4996,21 +4943,7 @@ export type UnfollowUserMutationVariables = Exact<{ export type UnfollowUserMutation = { __typename?: "Mutation"; - unfollowUser: { - __typename?: "UserGQL"; - username: string; - id: number; - following?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - }> | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - }> | null; - }; + unfollowUser: { __typename?: "UserGQL"; id: number; username: string }; }; export type GetUserFollowingFollowersQueryVariables = Exact<{ @@ -5027,12 +4960,14 @@ export type GetUserFollowingFollowersQuery = { id: number; username: string; profileImageUri?: string | null; + isFollowedByCurrentUser?: boolean | null; }> | null; followers?: Array<{ __typename?: "UserGQL"; id: number; username: string; profileImageUri?: string | null; + isFollowedByCurrentUser?: boolean | null; }> | null; } | null; }; @@ -5258,12 +5193,7 @@ export type GetVideoSocialDetailsByIdQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; comments: Array<{ @@ -5275,12 +5205,7 @@ export type GetVideoSocialDetailsByIdQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; replies: Array<{ __typename?: "CommentGQL"; @@ -5291,12 +5216,7 @@ export type GetVideoSocialDetailsByIdQuery = { id: number; username: string; profileImageUri?: string | null; - followers?: Array<{ - __typename?: "UserGQL"; - id: number; - username: string; - profileImageUri?: string | null; - }> | null; + isFollowedByCurrentUser?: boolean | null; }; }>; }>; @@ -5884,11 +5804,7 @@ export const UserSocialsFieldsFragmentDoc = gql` id username profileImageUri - followers { - id - username - profileImageUri - } + isFollowedByCurrentUser } `; export const VideoCardFieldsFragmentDoc = gql` @@ -6793,6 +6709,7 @@ export const GetVideoFeedDocument = gql` hasNextPage endCursor } + hasFollowing } } ${VideoCardFieldsFragmentDoc} @@ -9567,16 +9484,8 @@ export type GetUserTagsQueryResult = Apollo.QueryResult< export const FollowUserDocument = gql` mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { - username id - following { - id - username - } - followers { - id - username - } + username } } `; @@ -9626,16 +9535,8 @@ export type FollowUserMutationOptions = Apollo.BaseMutationOptions< export const UnfollowUserDocument = gql` mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { - username id - following { - id - username - } - followers { - id - username - } + username } } `; @@ -9690,11 +9591,13 @@ export const GetUserFollowingFollowersDocument = gql` id username profileImageUri + isFollowedByCurrentUser } followers { id username profileImageUri + isFollowedByCurrentUser } } } diff --git a/src/operations/feed.gql b/src/operations/feed.gql index 39baaa8..e0f271f 100644 --- a/src/operations/feed.gql +++ b/src/operations/feed.gql @@ -19,11 +19,7 @@ fragment UserSocialsFields on UserGQL { id username profileImageUri - followers { - id - username - profileImageUri - } + isFollowedByCurrentUser } fragment VideoCardFields on VideoGQL { @@ -116,5 +112,6 @@ query GetVideoFeed( hasNextPage endCursor } + hasFollowing } } diff --git a/src/operations/user.gql b/src/operations/user.gql index b0fd753..557bc27 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -88,31 +88,15 @@ query GetUserTags { mutation followUser($followedUserId: Int!) { followUser(followedUserId: $followedUserId) { - username id - following { - id - username - } - followers { - id - username - } + username } } mutation unfollowUser($followedUserId: Int!) { unfollowUser(followedUserId: $followedUserId) { - username id - following { - id - username - } - followers { - id - username - } + username } } @@ -123,11 +107,13 @@ query getUserFollowingFollowers { id username profileImageUri + isFollowedByCurrentUser } followers { id username profileImageUri + isFollowedByCurrentUser } } } diff --git a/src/operations/video.gql b/src/operations/video.gql index 5675745..b95df20 100644 --- a/src/operations/video.gql +++ b/src/operations/video.gql @@ -86,11 +86,7 @@ fragment UserSocialsFields on UserGQL { id username profileImageUri - followers { - id - username - profileImageUri - } + isFollowedByCurrentUser } query GetVideoSocialDetailsById($videoId: Int!) { diff --git a/src/schema.gql b/src/schema.gql index 37866a7..1db3355 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -374,6 +374,7 @@ type UserGQL { agreesToMarketing: Boolean following: [UserGQL!] followers: [UserGQL!] + isFollowedByCurrentUser: Boolean } type ShotGQL { @@ -653,6 +654,7 @@ input VideoFeedInputGQL @oneOf { followedByUserId: Int userId: Int allUsers: Boolean + home: Boolean } type MakePercentageIntervalGQL {