schema update delete dir
This commit is contained in:
parent
adeddc7994
commit
8789fee962
@ -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
3
src/graphql/deleteDir.graphql
Normal file
3
src/graphql/deleteDir.graphql
Normal file
@ -0,0 +1,3 @@
|
||||
mutation deleteDir($path: ID!){
|
||||
deleteDir(path:$path)
|
||||
}
|
Loading…
Reference in New Issue
Block a user