From d1d654ebac2d51e3841675faeb56480e440f622f Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 5 Mar 2024 18:08:09 +0100 Subject: Initial commit --- frontend/operations.graphql | 696 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 696 insertions(+) create mode 100644 frontend/operations.graphql (limited to 'frontend/operations.graphql') diff --git a/frontend/operations.graphql b/frontend/operations.graphql new file mode 100644 index 0000000..5c41080 --- /dev/null +++ b/frontend/operations.graphql @@ -0,0 +1,696 @@ +fragment Image on Image { + hash + width + height +} + +fragment Page on Page { + id + path + image { + id + hash + aspectRatio + width + height + } + comicId +} + +fragment Comic on Comic { + id + title + originalTitle + favourite + cover { + ...Image + } + tags { + name + description + } + artists { + name + } + characters { + name + } + worlds { + name + } + circles { + name + } +} + +fragment FullArchive on FullArchive { + id + name + path + size + createdAt + mtime + organized + pageCount + pages { + ...Page + } + comics { + ...Comic + } +} + +fragment Archive on Archive { + id + name + size + pageCount + cover { + ...Image + } +} + +fragment FullComic on FullComic { + id + title + originalTitle + url + language + direction + date + layout + rating + category + censorship + favourite + createdAt + updatedAt + organized + bookmarked + pages { + ...Page + } + archive { + id + } + tags { + id + name + description + } + artists { + id + name + } + characters { + id + name + } + worlds { + id + name + } + circles { + id + name + } +} + +fragment ComicScraper on ComicScraper { + id + name +} + +fragment ScrapeComicResult on ScrapeComicResult { + data { + artists + category + censorship + characters + circles + date + direction + language + layout + originalTitle + url + rating + tags + title + worlds + } + warnings +} + +query comics($pagination: Pagination!, $filter: ComicFilterInput, $sort: ComicSortInput) { + comics(pagination: $pagination, filter: $filter, sort: $sort) { + edges { + ...Comic + } + count + } +} + +query archives($pagination: Pagination!, $filter: ArchiveFilterInput, $sort: ArchiveSortInput) { + archives(pagination: $pagination, filter: $filter, sort: $sort) { + edges { + ...Archive + } + count + } +} + +query archive($id: Int!) { + archive(id: $id) { + ... on FullArchive { + ...FullArchive + } + ... on Error { + message + } + } +} + +query comic($id: Int!) { + comic(id: $id) { + ... on FullComic { + ...FullComic + } + ... on Error { + message + } + } +} + +query tag($id: Int!) { + tag(id: $id) { + ... on FullTag { + id + name + description + namespaces { + id + name + } + } + ... on Error { + message + } + } +} + +query tags($pagination: Pagination!, $filter: TagFilterInput, $sort: TagSortInput) { + tags(pagination: $pagination, filter: $filter, sort: $sort) { + edges { + id + name + description + } + count + } +} + +query namespace($id: Int!) { + namespace(id: $id) { + ... on Namespace { + id + name + sortName + } + ... on Error { + message + } + } +} + +query namespaces( + $pagination: Pagination! + $filter: NamespaceFilterInput + $sort: NamespaceSortInput +) { + namespaces(pagination: $pagination, filter: $filter, sort: $sort) { + count + edges { + id + name + } + } +} + +query comicTagList($forFilter: Boolean = false) { + comicTags(forFilter: $forFilter) { + edges { + id + name + } + } +} + +query artistList { + artists { + edges { + id + name + } + } +} + +query characterList { + characters { + edges { + id + name + } + } +} + +query circleList { + circles { + edges { + id + name + } + } +} + +query worldList { + worlds { + edges { + id + name + } + } +} + +query namespaceList { + namespaces { + edges { + id + name + } + } +} + +query artists($pagination: Pagination!, $filter: ArtistFilterInput, $sort: ArtistSortInput) { + artists(pagination: $pagination, filter: $filter, sort: $sort) { + count + edges { + id + name + } + } +} + +query artist($id: Int!) { + artist(id: $id) { + ... on Artist { + id + name + } + ... on Error { + message + } + } +} + +query characters( + $pagination: Pagination! + $filter: CharacterFilterInput + $sort: CharacterSortInput +) { + characters(pagination: $pagination, filter: $filter, sort: $sort) { + count + edges { + id + name + } + } +} + +query character($id: Int!) { + character(id: $id) { + ... on Character { + id + name + } + ... on Error { + message + } + } +} + +query circles($pagination: Pagination!, $filter: CircleFilterInput, $sort: CircleSortInput) { + circles(pagination: $pagination, filter: $filter, sort: $sort) { + count + edges { + id + name + } + } +} + +query circle($id: Int!) { + circle(id: $id) { + ... on Circle { + id + name + } + ... on Error { + message + } + } +} + +query worlds($pagination: Pagination!, $filter: WorldFilterInput, $sort: WorldSortInput) { + worlds(pagination: $pagination, filter: $filter, sort: $sort) { + count + edges { + id + name + } + } +} + +query world($id: Int!) { + world(id: $id) { + ... on World { + id + name + } + ... on Error { + message + } + } +} + +query comicScrapers($id: Int!) { + comicScrapers(id: $id) { + id + name + } +} + +query scrapeComic($id: Int!, $scraper: String!) { + scrapeComic(id: $id, scraper: $scraper) { + ... on ScrapeComicResult { + ...ScrapeComicResult + } + ... on Error { + message + } + } +} + +query frontpage { + recent: comics(pagination: { items: 6 }, sort: { on: CREATED_AT, direction: DESCENDING }) { + edges { + ...Comic + } + count + } + favourites: comics( + pagination: { items: 6 } + filter: { include: { favourite: true } } + sort: { on: RANDOM } + ) { + edges { + ...Comic + } + count + } + bookmarked: comics( + pagination: { items: 6 } + filter: { include: { bookmarked: true } } + sort: { on: RANDOM } + ) { + edges { + ...Comic + } + count + } +} + +mutation addComic($input: AddComicInput!) { + addComic(input: $input) { + ... on AddComicSuccess { + message + archivePagesRemaining + } + ... on Error { + message + } + } +} + +mutation updateArchives($ids: [Int!]!, $input: UpdateArchiveInput!) { + updateArchives(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateComics($ids: [Int!]!, $input: UpdateComicInput!) { + updateComics(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation upsertComics($ids: [Int!]!, $input: UpsertComicInput!) { + upsertComics(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteArchives($ids: [Int!]!) { + deleteArchives(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteComics($ids: [Int!]!) { + deleteComics(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addTag($input: AddTagInput!) { + addTag(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateTags($ids: [Int!]!, $input: UpdateTagInput!) { + updateTags(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteTags($ids: [Int!]!) { + deleteTags(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addNamespace($input: AddNamespaceInput!) { + addNamespace(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateNamespaces($ids: [Int!]!, $input: UpdateNamespaceInput!) { + updateNamespaces(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteNamespaces($ids: [Int!]!) { + deleteNamespaces(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addArtist($input: AddArtistInput!) { + addArtist(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateArtists($ids: [Int!]!, $input: UpdateArtistInput!) { + updateArtists(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteArtists($ids: [Int!]!) { + deleteArtists(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addCharacter($input: AddCharacterInput!) { + addCharacter(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateCharacters($ids: [Int!]!, $input: UpdateCharacterInput!) { + updateCharacters(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteCharacters($ids: [Int!]!) { + deleteCharacters(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addCircle($input: AddCircleInput!) { + addCircle(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateCircles($ids: [Int!]!, $input: UpdateCircleInput!) { + updateCircles(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteCircles($ids: [Int!]!) { + deleteCircles(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation addWorld($input: AddWorldInput!) { + addWorld(input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation updateWorlds($ids: [Int!]!, $input: UpdateWorldInput!) { + updateWorlds(ids: $ids, input: $input) { + ... on Success { + message + } + ... on Error { + message + } + } +} + +mutation deleteWorlds($ids: [Int!]!) { + deleteWorlds(ids: $ids) { + ... on Success { + message + } + ... on Error { + message + } + } +} -- cgit v1.2.3-2-gb3c3