schema update delete dir

This commit is contained in:
Niklas 2021-08-20 21:39:20 +02:00
parent adeddc7994
commit 8789fee962
3 changed files with 709 additions and 626 deletions

View File

@ -45,6 +45,7 @@ export type RootMutation = {
copy?: Maybe<File>;
createDir: Directory;
delete?: Maybe<Scalars["String"]>;
deleteDir: Scalars["String"];
move?: Maybe<File>;
};
@ -65,6 +66,11 @@ export type RootMutationDeleteArgs = {
};
export type RootMutationDeleteDirArgs = {
path: Scalars["ID"];
};
export type RootMutationMoveArgs = {
src: Scalars["ID"];
dest: Scalars["ID"];
@ -119,6 +125,16 @@ export type CreateDirMutation = (
) }
);
export type DeleteDirMutationVariables = Exact<{
path: Scalars["ID"];
}>;
export type DeleteDirMutation = (
{ __typename?: "RootMutation" }
& Pick<RootMutation, "deleteDir">
);
export type DeleteFileMutationVariables = Exact<{
id: Scalars["ID"];
}>;
@ -240,6 +256,37 @@ export function useCreateDirMutation(baseOptions?: Apollo.MutationHookOptions<Cr
export type CreateDirMutationHookResult = ReturnType<typeof useCreateDirMutation>;
export type CreateDirMutationResult = Apollo.MutationResult<CreateDirMutation>;
export type CreateDirMutationOptions = Apollo.BaseMutationOptions<CreateDirMutation, CreateDirMutationVariables>;
export const DeleteDirDocument = gql`
mutation deleteDir($path: ID!) {
deleteDir(path: $path)
}
`
export type DeleteDirMutationFn = Apollo.MutationFunction<DeleteDirMutation, DeleteDirMutationVariables>;
/**
* __useDeleteDirMutation__
*
* To run a mutation, you first call `useDeleteDirMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteDirMutation` 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 [deleteDirMutation, { data, loading, error }] = useDeleteDirMutation({
* variables: {
* path: // value for 'path'
* },
* });
*/
export function useDeleteDirMutation(baseOptions?: Apollo.MutationHookOptions<DeleteDirMutation, DeleteDirMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteDirMutation, DeleteDirMutationVariables>(DeleteDirDocument, options)
}
export type DeleteDirMutationHookResult = ReturnType<typeof useDeleteDirMutation>;
export type DeleteDirMutationResult = Apollo.MutationResult<DeleteDirMutation>;
export type DeleteDirMutationOptions = Apollo.BaseMutationOptions<DeleteDirMutation, DeleteDirMutationVariables>;
export const DeleteFileDocument = gql`
mutation deleteFile($id: ID!) {
delete(id: $id)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
mutation deleteDir($path: ID!){
deleteDir(path:$path)
}