Pridan fotoeditor

This commit is contained in:
Michal Kváček
2023-10-27 22:30:47 +02:00
parent 4c8952117b
commit 100e1fa33b
18 changed files with 502 additions and 23 deletions
+37 -3
View File
@@ -1,5 +1,6 @@
import gql from "graphql-tag";
import {FRAGMENT_PHOTO_FULL_INFO} from "src/graphql/fragments/photo";
import {FRAGMENT_FLIGHT_LIST_INFO} from "src/graphql/fragments/flight_list";
export const UPLOAD_PHOTO = gql`
mutation uploadPhoto($input: UploadPhotoInput!) {
@@ -21,16 +22,49 @@ mutation editPhoto($id: Int!, $input: EditPhotoInput!) {
${FRAGMENT_PHOTO_FULL_INFO}
`;
export const ROTATE_PHOTO = gql`
mutation rotatePhoto($id: Int!, $angle: Int!) {
rotatePhoto(id: $id, angle: $angle) {
export const CHANGE_PHOTO_ORIENTATION = gql`
mutation changeOrientation($id: Int!, $direction: String!) {
changeOrientation(id: $id, direction: $direction) {
...photoFullInfo
flight {
...flightListInfo
}
}
}
${FRAGMENT_PHOTO_FULL_INFO}
${FRAGMENT_FLIGHT_LIST_INFO}
`;
export const ADJUST_PHOTO = gql`
mutation adjustPhoto($id: Int!, $adjustment: AdjustmentInput!) {
adjustPhoto(id: $id, adjustment: $adjustment) {
...photoFullInfo
adjustment {
contrast
saturation
brightness
rotate
sharpness
cropLeft
cropTop
cropWidth
cropHeight
}
flight {
...flightListInfo
}
}
}
${FRAGMENT_PHOTO_FULL_INFO}
${FRAGMENT_FLIGHT_LIST_INFO}
`;
// TODO: ^^ udelat z toho asi jeden fragment a pouzit i v query GET_PHOTO
export const DELETE_PHOTO = gql`
mutation deletePhoto($id: Int!) {