Suwayomi / Suwayomi-Server

A rewrite of Tachiyomi for the Desktop
Mozilla Public License 2.0
3.73k stars 196 forks source link

[Feature Request] Be able to query the graphql by trackerID #914

Closed taos15 closed 3 months ago

taos15 commented 3 months ago

What feature should be added to Suwayomi?

As a developer I want to be able query a manga from the graphql by its trackerID

Example: isntead of depending on query MyQuery { query MyQuery { manga(id: 449) { title } }

I should be able to use the remoteID of the tracker: query MyQuery { manga( { title trackRecords { nodes { remoteId } } } }

Why/Project's Benefit/Existing Problem

It will be facilitate associating manga from different sources, it would easier the way migrating are implemented in other clients, allow other clients to implement consolidated local sources, using the tracker's Id developers can find if there is another manga with the same ID and they can use the same download location for local sources. This would also make it possible to have the same manga from multiple sources, without worrying about duplicated files.

Robonau commented 3 months ago

for anyone that comes across this in the future

query mangasbytrack($trackerId: Int!, $remoteId: LongString!) {
  trackRecords(condition: {remoteId: $remoteId, trackerId: $trackerId}) {
    nodes {
      manga {
        id
        title
        ...
      }
    }
  }
}
taos15 commented 3 months ago

Thanks. I found that query which is why I closed the request. I appreciate it.