delete mutation
This commit is contained in:
parent
c198a81aaa
commit
895e59d32c
@ -86,6 +86,16 @@ export type RootQueryFilesArgs = {
|
|||||||
path: Scalars["String"];
|
path: Scalars["String"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type DeleteFileMutationVariables = Exact<{
|
||||||
|
id: Scalars["ID"];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
|
||||||
|
export type DeleteFileMutation = (
|
||||||
|
{ __typename?: "RootMutation" }
|
||||||
|
& Pick<RootMutation, "delete">
|
||||||
|
);
|
||||||
|
|
||||||
export type GetFileQueryVariables = Exact<{
|
export type GetFileQueryVariables = Exact<{
|
||||||
id: Scalars["ID"];
|
id: Scalars["ID"];
|
||||||
}>;
|
}>;
|
||||||
@ -116,6 +126,37 @@ export type OpenDirQuery = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
export const DeleteFileDocument = gql`
|
||||||
|
mutation deleteFile($id: ID!) {
|
||||||
|
delete(id: $id)
|
||||||
|
}
|
||||||
|
`
|
||||||
|
export type DeleteFileMutationFn = Apollo.MutationFunction<DeleteFileMutation, DeleteFileMutationVariables>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useDeleteFileMutation__
|
||||||
|
*
|
||||||
|
* To run a mutation, you first call `useDeleteFileMutation` within a React component and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useDeleteFileMutation` 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 [deleteFileMutation, { data, loading, error }] = useDeleteFileMutation({
|
||||||
|
* variables: {
|
||||||
|
* id: // value for 'id'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useDeleteFileMutation(baseOptions?: Apollo.MutationHookOptions<DeleteFileMutation, DeleteFileMutationVariables>) {
|
||||||
|
const options = {...defaultOptions, ...baseOptions}
|
||||||
|
return Apollo.useMutation<DeleteFileMutation, DeleteFileMutationVariables>(DeleteFileDocument, options)
|
||||||
|
}
|
||||||
|
export type DeleteFileMutationHookResult = ReturnType<typeof useDeleteFileMutation>;
|
||||||
|
export type DeleteFileMutationResult = Apollo.MutationResult<DeleteFileMutation>;
|
||||||
|
export type DeleteFileMutationOptions = Apollo.BaseMutationOptions<DeleteFileMutation, DeleteFileMutationVariables>;
|
||||||
export const GetFileDocument = gql`
|
export const GetFileDocument = gql`
|
||||||
query getFile($id: ID!) {
|
query getFile($id: ID!) {
|
||||||
file(id: $id) {
|
file(id: $id) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
3
src/graphql/deleteFile.graphql
Normal file
3
src/graphql/deleteFile.graphql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mutation deleteFile($id: ID!) {
|
||||||
|
delete(id:$id)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user