diff --git a/src/index.tsx b/src/index.tsx index b4d09d0..b4b8e80 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2812,6 +2812,7 @@ export type VideoCardFieldsFragment = { updatedAt?: any | null; startTime?: any | null; endTime?: any | null; + private: boolean; elapsedTime?: number | null; tableSize: number; owner?: { @@ -2864,6 +2865,7 @@ export type GetVideoFeedQuery = { updatedAt?: any | null; startTime?: any | null; endTime?: any | null; + private: boolean; elapsedTime?: number | null; tableSize: number; owner?: { @@ -3314,6 +3316,7 @@ export type GetLoggedInUserQuery = { activeVideoId?: number | null; createdAt?: any | null; updatedAt?: any | null; + videosPrivateByDefault?: boolean | null; } | null; }; @@ -3441,6 +3444,25 @@ export type DoesUsernameExistQuery = { doesUsernameExist: boolean; }; +export type EditUserMutationVariables = Exact<{ + username?: InputMaybe; + fargoRating?: InputMaybe; + videosPrivateByDefault?: InputMaybe; +}>; + +export type EditUserMutation = { + __typename?: "Mutation"; + editUser: { + __typename?: "UserGQL"; + id: number; + firebaseUid?: string | null; + username: string; + fargoRating?: number | null; + updatedAt?: any | null; + videosPrivateByDefault?: boolean | null; + }; +}; + export type GetStreamMonitoringDetailsQueryVariables = Exact<{ videoId: Scalars["Int"]["input"]; debuggingJson?: InputMaybe; @@ -4124,6 +4146,7 @@ export const VideoCardFieldsFragmentDoc = gql` updatedAt startTime endTime + private elapsedTime screenshotUri stream { @@ -5527,6 +5550,7 @@ export const GetLoggedInUserDocument = gql` activeVideoId createdAt updatedAt + videosPrivateByDefault } } `; @@ -6178,6 +6202,70 @@ export type DoesUsernameExistQueryResult = Apollo.QueryResult< DoesUsernameExistQuery, DoesUsernameExistQueryVariables >; +export const EditUserDocument = gql` + mutation editUser( + $username: String + $fargoRating: Int + $videosPrivateByDefault: Boolean + ) { + editUser( + input: { + username: $username + fargoRating: $fargoRating + videosPrivateByDefault: $videosPrivateByDefault + } + ) { + id + firebaseUid + username + fargoRating + updatedAt + videosPrivateByDefault + } + } +`; +export type EditUserMutationFn = Apollo.MutationFunction< + EditUserMutation, + EditUserMutationVariables +>; + +/** + * __useEditUserMutation__ + * + * To run a mutation, you first call `useEditUserMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useEditUserMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [editUserMutation, { data, loading, error }] = useEditUserMutation({ + * variables: { + * username: // value for 'username' + * fargoRating: // value for 'fargoRating' + * videosPrivateByDefault: // value for 'videosPrivateByDefault' + * }, + * }); + */ +export function useEditUserMutation( + baseOptions?: Apollo.MutationHookOptions< + EditUserMutation, + EditUserMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + EditUserDocument, + options, + ); +} +export type EditUserMutationHookResult = ReturnType; +export type EditUserMutationResult = Apollo.MutationResult; +export type EditUserMutationOptions = Apollo.BaseMutationOptions< + EditUserMutation, + EditUserMutationVariables +>; export const GetStreamMonitoringDetailsDocument = gql` query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) { getVideo(videoId: $videoId, debuggingJson: $debuggingJson) { diff --git a/src/operations/feed.gql b/src/operations/feed.gql index c3dc5d8..e75c6aa 100644 --- a/src/operations/feed.gql +++ b/src/operations/feed.gql @@ -56,6 +56,7 @@ fragment VideoCardFields on VideoGQL { updatedAt startTime endTime + private elapsedTime screenshotUri stream { diff --git a/src/operations/user.gql b/src/operations/user.gql index 2467694..e00eb54 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -41,6 +41,7 @@ query getLoggedInUser { activeVideoId createdAt updatedAt + videosPrivateByDefault } } @@ -135,3 +136,24 @@ query getUserFollowingFollowers { query doesUsernameExist($candidateUsername: String!) { doesUsernameExist(candidateUsername: $candidateUsername) } + +mutation editUser( + $username: String + $fargoRating: Int + $videosPrivateByDefault: Boolean +) { + editUser( + input: { + username: $username + fargoRating: $fargoRating + videosPrivateByDefault: $videosPrivateByDefault + } + ) { + id + firebaseUid + username + fargoRating + updatedAt + videosPrivateByDefault + } +}