Refactor Picture upload

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-20 18:34:13 +01:00
parent 7a731f1ef8
commit 605239130e
8 changed files with 70 additions and 39 deletions

View File

@@ -1,6 +1,5 @@
import gql from "graphql-tag";
/* eslint-disable import/prefer-default-export */
export const UPLOAD_PICTURE = gql`
mutation UploadPicture($file: Upload!, $alt: String, $name: String!) {
uploadPicture(file: $file, alt: $alt, name: $name) {
@@ -9,3 +8,11 @@ export const UPLOAD_PICTURE = gql`
}
}
`;
export const REMOVE_PICTURE = gql`
mutation RemovePicture($id: ID!) {
removePicture(id: $id) {
id
}
}
`;