Adds changes to schema for altering user profile image
This commit is contained in:
parent
2db886ea13
commit
09bbbf0b3d
155
src/index.tsx
155
src/index.tsx
@ -184,6 +184,8 @@ export type Mutation = {
|
||||
createBucketSet: BucketSetGql;
|
||||
createUploadStream: CreateUploadStreamReturn;
|
||||
deleteVideo: Scalars["Boolean"]["output"];
|
||||
editProfileImageUri: UserGql;
|
||||
getProfileImageUploadLink: GetUploadLinkReturn;
|
||||
getUploadLink: GetUploadLinkReturn;
|
||||
terminateUploadStream: Scalars["Boolean"]["output"];
|
||||
};
|
||||
@ -200,6 +202,14 @@ export type MutationDeleteVideoArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type MutationEditProfileImageUriArgs = {
|
||||
profileImageUri: Scalars["String"]["input"];
|
||||
};
|
||||
|
||||
export type MutationGetProfileImageUploadLinkArgs = {
|
||||
fileExt?: InputMaybe<Scalars["String"]["input"]>;
|
||||
};
|
||||
|
||||
export type MutationGetUploadLinkArgs = {
|
||||
segmentIndex: Scalars["Int"]["input"];
|
||||
videoId: Scalars["Int"]["input"];
|
||||
@ -375,6 +385,7 @@ export type UserGql = {
|
||||
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
firebaseUid: Scalars["String"]["output"];
|
||||
id: Scalars["Int"]["output"];
|
||||
profileImageUri?: Maybe<Scalars["String"]["output"]>;
|
||||
statistics: UserStatisticsGql;
|
||||
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
username: Scalars["String"]["output"];
|
||||
@ -560,6 +571,40 @@ export type GetShotsQuery = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GetProfileImageUploadLinkMutationVariables = Exact<{
|
||||
fileExt?: InputMaybe<Scalars["String"]["input"]>;
|
||||
}>;
|
||||
|
||||
export type GetProfileImageUploadLinkMutation = {
|
||||
__typename?: "Mutation";
|
||||
getProfileImageUploadLink: {
|
||||
__typename?: "GetUploadLinkReturn";
|
||||
uploadUrl: string;
|
||||
headers: Array<{
|
||||
__typename?: "Header";
|
||||
key: string;
|
||||
value: string;
|
||||
} | null>;
|
||||
};
|
||||
};
|
||||
|
||||
export type EditProfileImageUriMutationVariables = Exact<{
|
||||
profileImageUri: Scalars["String"]["input"];
|
||||
}>;
|
||||
|
||||
export type EditProfileImageUriMutation = {
|
||||
__typename?: "Mutation";
|
||||
editProfileImageUri: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
firebaseUid: string;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
@ -1020,6 +1065,116 @@ export type GetShotsQueryResult = Apollo.QueryResult<
|
||||
GetShotsQuery,
|
||||
GetShotsQueryVariables
|
||||
>;
|
||||
export const GetProfileImageUploadLinkDocument = gql`
|
||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type GetProfileImageUploadLinkMutationFn = Apollo.MutationFunction<
|
||||
GetProfileImageUploadLinkMutation,
|
||||
GetProfileImageUploadLinkMutationVariables
|
||||
>;
|
||||
|
||||
/**
|
||||
* __useGetProfileImageUploadLinkMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useGetProfileImageUploadLinkMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetProfileImageUploadLinkMutation` 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 [getProfileImageUploadLinkMutation, { data, loading, error }] = useGetProfileImageUploadLinkMutation({
|
||||
* variables: {
|
||||
* fileExt: // value for 'fileExt'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetProfileImageUploadLinkMutation(
|
||||
baseOptions?: Apollo.MutationHookOptions<
|
||||
GetProfileImageUploadLinkMutation,
|
||||
GetProfileImageUploadLinkMutationVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useMutation<
|
||||
GetProfileImageUploadLinkMutation,
|
||||
GetProfileImageUploadLinkMutationVariables
|
||||
>(GetProfileImageUploadLinkDocument, options);
|
||||
}
|
||||
export type GetProfileImageUploadLinkMutationHookResult = ReturnType<
|
||||
typeof useGetProfileImageUploadLinkMutation
|
||||
>;
|
||||
export type GetProfileImageUploadLinkMutationResult =
|
||||
Apollo.MutationResult<GetProfileImageUploadLinkMutation>;
|
||||
export type GetProfileImageUploadLinkMutationOptions =
|
||||
Apollo.BaseMutationOptions<
|
||||
GetProfileImageUploadLinkMutation,
|
||||
GetProfileImageUploadLinkMutationVariables
|
||||
>;
|
||||
export const EditProfileImageUriDocument = gql`
|
||||
mutation editProfileImageUri($profileImageUri: String!) {
|
||||
editProfileImageUri(profileImageUri: $profileImageUri) {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
profileImageUri
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type EditProfileImageUriMutationFn = Apollo.MutationFunction<
|
||||
EditProfileImageUriMutation,
|
||||
EditProfileImageUriMutationVariables
|
||||
>;
|
||||
|
||||
/**
|
||||
* __useEditProfileImageUriMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useEditProfileImageUriMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useEditProfileImageUriMutation` 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 [editProfileImageUriMutation, { data, loading, error }] = useEditProfileImageUriMutation({
|
||||
* variables: {
|
||||
* profileImageUri: // value for 'profileImageUri'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useEditProfileImageUriMutation(
|
||||
baseOptions?: Apollo.MutationHookOptions<
|
||||
EditProfileImageUriMutation,
|
||||
EditProfileImageUriMutationVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useMutation<
|
||||
EditProfileImageUriMutation,
|
||||
EditProfileImageUriMutationVariables
|
||||
>(EditProfileImageUriDocument, options);
|
||||
}
|
||||
export type EditProfileImageUriMutationHookResult = ReturnType<
|
||||
typeof useEditProfileImageUriMutation
|
||||
>;
|
||||
export type EditProfileImageUriMutationResult =
|
||||
Apollo.MutationResult<EditProfileImageUriMutation>;
|
||||
export type EditProfileImageUriMutationOptions = Apollo.BaseMutationOptions<
|
||||
EditProfileImageUriMutation,
|
||||
EditProfileImageUriMutationVariables
|
||||
>;
|
||||
export const GetStreamMonitoringDetailsDocument = gql`
|
||||
query GetStreamMonitoringDetails($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
|
20
src/operations/user.gql
Normal file
20
src/operations/user.gql
Normal file
@ -0,0 +1,20 @@
|
||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation editProfileImageUri($profileImageUri: String!) {
|
||||
editProfileImageUri(profileImageUri: $profileImageUri) {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
profileImageUri
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
@ -106,6 +106,7 @@ type UserGQL {
|
||||
id: Int!
|
||||
firebaseUid: String!
|
||||
username: String!
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
statistics: UserStatisticsGQL!
|
||||
@ -284,6 +285,8 @@ type Mutation {
|
||||
videoMetadata: VideoMetadataInput!
|
||||
): Boolean!
|
||||
deleteVideo(videoId: Int!): Boolean!
|
||||
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
|
||||
editProfileImageUri(profileImageUri: String!): UserGQL!
|
||||
}
|
||||
|
||||
input CreateBucketSetInput {
|
||||
|
Loading…
Reference in New Issue
Block a user