implemented move
This commit is contained in:
@@ -123,6 +123,20 @@ export type GetFileQuery = (
|
||||
)> }
|
||||
);
|
||||
|
||||
export type MoveMutationVariables = Exact<{
|
||||
src: Scalars["ID"];
|
||||
dest: Scalars["ID"];
|
||||
}>;
|
||||
|
||||
|
||||
export type MoveMutation = (
|
||||
{ __typename?: "RootMutation" }
|
||||
& { move?: Maybe<(
|
||||
{ __typename?: "File" }
|
||||
& Pick<File, "id">
|
||||
)> }
|
||||
);
|
||||
|
||||
export type OpenDirQueryVariables = Exact<{
|
||||
path: Scalars["String"];
|
||||
}>;
|
||||
@@ -244,6 +258,40 @@ export function useGetFileLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<Ge
|
||||
export type GetFileQueryHookResult = ReturnType<typeof useGetFileQuery>;
|
||||
export type GetFileLazyQueryHookResult = ReturnType<typeof useGetFileLazyQuery>;
|
||||
export type GetFileQueryResult = Apollo.QueryResult<GetFileQuery, GetFileQueryVariables>;
|
||||
export const MoveDocument = gql`
|
||||
mutation move($src: ID!, $dest: ID!) {
|
||||
move(src: $src, dest: $dest) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
||||
export type MoveMutationFn = Apollo.MutationFunction<MoveMutation, MoveMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useMoveMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useMoveMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useMoveMutation` 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 [moveMutation, { data, loading, error }] = useMoveMutation({
|
||||
* variables: {
|
||||
* src: // value for 'src'
|
||||
* dest: // value for 'dest'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useMoveMutation(baseOptions?: Apollo.MutationHookOptions<MoveMutation, MoveMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<MoveMutation, MoveMutationVariables>(MoveDocument, options)
|
||||
}
|
||||
export type MoveMutationHookResult = ReturnType<typeof useMoveMutation>;
|
||||
export type MoveMutationResult = Apollo.MutationResult<MoveMutation>;
|
||||
export type MoveMutationOptions = Apollo.BaseMutationOptions<MoveMutation, MoveMutationVariables>;
|
||||
export const OpenDirDocument = gql`
|
||||
query openDir($path: String!) {
|
||||
files(path: $path) {
|
||||
|
||||
Reference in New Issue
Block a user