added createDir schema
This commit is contained in:
parent
58fe46f1de
commit
c448051838
@ -43,6 +43,7 @@ export type File = {
|
||||
export type RootMutation = {
|
||||
__typename?: "RootMutation";
|
||||
copy?: Maybe<File>;
|
||||
createDir: Directory;
|
||||
delete?: Maybe<Scalars["String"]>;
|
||||
move?: Maybe<File>;
|
||||
};
|
||||
@ -54,14 +55,19 @@ export type RootMutationCopyArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type RootMutationCreateDirArgs = {
|
||||
path: Scalars["ID"];
|
||||
};
|
||||
|
||||
|
||||
export type RootMutationDeleteArgs = {
|
||||
id: Scalars["ID"];
|
||||
};
|
||||
|
||||
|
||||
export type RootMutationMoveArgs = {
|
||||
dest: Scalars["ID"];
|
||||
src: Scalars["ID"];
|
||||
dest: Scalars["ID"];
|
||||
};
|
||||
|
||||
export type RootQuery = {
|
||||
@ -100,6 +106,19 @@ export type CopyMutation = (
|
||||
)> }
|
||||
);
|
||||
|
||||
export type CreateDirMutationVariables = Exact<{
|
||||
path: Scalars["ID"];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateDirMutation = (
|
||||
{ __typename?: "RootMutation" }
|
||||
& { createDir: (
|
||||
{ __typename?: "Directory" }
|
||||
& Pick<Directory, "id">
|
||||
) }
|
||||
);
|
||||
|
||||
export type DeleteFileMutationVariables = Exact<{
|
||||
id: Scalars["ID"];
|
||||
}>;
|
||||
@ -188,6 +207,39 @@ export function useCopyMutation(baseOptions?: Apollo.MutationHookOptions<CopyMut
|
||||
export type CopyMutationHookResult = ReturnType<typeof useCopyMutation>;
|
||||
export type CopyMutationResult = Apollo.MutationResult<CopyMutation>;
|
||||
export type CopyMutationOptions = Apollo.BaseMutationOptions<CopyMutation, CopyMutationVariables>;
|
||||
export const CreateDirDocument = gql`
|
||||
mutation createDir($path: ID!) {
|
||||
createDir(path: $path) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
||||
export type CreateDirMutationFn = Apollo.MutationFunction<CreateDirMutation, CreateDirMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useCreateDirMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useCreateDirMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useCreateDirMutation` 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 [createDirMutation, { data, loading, error }] = useCreateDirMutation({
|
||||
* variables: {
|
||||
* path: // value for 'path'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useCreateDirMutation(baseOptions?: Apollo.MutationHookOptions<CreateDirMutation, CreateDirMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateDirMutation, CreateDirMutationVariables>(CreateDirDocument, options)
|
||||
}
|
||||
export type CreateDirMutationHookResult = ReturnType<typeof useCreateDirMutation>;
|
||||
export type CreateDirMutationResult = Apollo.MutationResult<CreateDirMutation>;
|
||||
export type CreateDirMutationOptions = Apollo.BaseMutationOptions<CreateDirMutation, CreateDirMutationVariables>;
|
||||
export const DeleteFileDocument = gql`
|
||||
mutation deleteFile($id: ID!) {
|
||||
delete(id: $id)
|
||||
|
File diff suppressed because it is too large
Load Diff
5
src/graphql/createDir.graphql
Normal file
5
src/graphql/createDir.graphql
Normal file
@ -0,0 +1,5 @@
|
||||
mutation createDir($path: ID!){
|
||||
createDir(path:$path){
|
||||
id
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user