Skip to content

Commit

Permalink
Merge pull request #239 from Suwayomi/main
Browse files Browse the repository at this point in the history
new download changed subscription + bring back AppShell
  • Loading branch information
Robonau authored Nov 15, 2024
2 parents c519ecf + 5b6d753 commit c70747a
Show file tree
Hide file tree
Showing 18 changed files with 618 additions and 1,402 deletions.
49 changes: 47 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,19 @@ input DoubleFilterInput {
notIn: [Float!]
}

input DownloadChangedInput {
"""
Sets a max number of updates that can be contained in a download update
message.Everything above this limit will be omitted and the "downloadStatus"
should be re-fetched via the corresponding query. Due to the graphql
subscription execution strategy not supporting batching for data loaders, the
data loaders run into the n+1 problem, which can cause the server to get
unresponsive until the status update has been handled. This is an issue e.g.
when mass en- or dequeuing downloads.
"""
maxUpdates: Int
}

type DownloadEdge implements Edge {
cursor: Cursor!
node: DownloadType!
Expand Down Expand Up @@ -458,13 +471,44 @@ type DownloadStatus {
}

type DownloadType {
position: Int!
progress: Float!
state: DownloadState!
tries: Int!
chapter: ChapterType!
manga: MangaType!
}

type DownloadUpdate {
download: DownloadType!
type: DownloadUpdateType!
}

type DownloadUpdates {
"""
The current download queue at the time of sending initial message. Is null for all following messages
"""
initial: [DownloadType!]

"""
Indicates whether updates have been omitted based on the "maxUpdates"
subscription variable. In case updates have been omitted, the "downloadStatus"
query should be re-fetched.
"""
omittedUpdates: Boolean!
state: DownloaderState!
updates: [DownloadUpdate!]!
}

enum DownloadUpdateType {
QUEUED
DEQUEUED
PROGRESS
FINISHED
ERROR
POSITION
}

interface Edge {
"""A cursor for use in pagination."""
cursor: Cursor!
Expand Down Expand Up @@ -1062,7 +1106,7 @@ type Mutation {
updateStop(input: UpdateStopInput!): UpdateStopPayload!
}

union Node = CategoryMetaType | CategoryType | ChapterMetaType | ChapterType | DownloadType | ExtensionType | GlobalMetaType | MangaMetaType | MangaType | PartialSettingsType | SettingsType | SourceMetaType | SourceType | TrackRecordType | TrackerType
union Node = CategoryMetaType | CategoryType | ChapterMetaType | ChapterType | DownloadType | DownloadUpdate | ExtensionType | GlobalMetaType | MangaMetaType | MangaType | PartialSettingsType | SettingsType | SourceMetaType | SourceType | TrackRecordType | TrackerType

interface NodeList {
"""
Expand Down Expand Up @@ -1638,7 +1682,8 @@ input StringFilterInput {
}

type Subscription {
downloadChanged: DownloadStatus!
downloadChanged: DownloadStatus! @deprecated(reason: "Replaced width downloadStatusChanged, replace with downloadStatusChanged(input)")
downloadStatusChanged(input: DownloadChangedInput!): DownloadUpdates!
webUIUpdateStatusChange: WebUIUpdateStatus!
updateStatusChanged: UpdateStatus!
}
Expand Down
117 changes: 0 additions & 117 deletions src/gql/Fragments.gql

This file was deleted.

Loading

0 comments on commit c70747a

Please sign in to comment.