diff options
| author | Fuwn <[email protected]> | 2026-06-05 13:58:43 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-06-05 13:58:43 +0000 |
| commit | 83879a0fa01415999116cbc46377b4819fc19f96 (patch) | |
| tree | a15d2870b29f727923b2dcdc3b5f017dd4575407 /src/graphql/anime | |
| parent | fix(schedule): use masonry columns so day panels collapse cleanly (diff) | |
| download | due.moe-83879a0fa01415999116cbc46377b4819fc19f96.tar.xz due.moe-83879a0fa01415999116cbc46377b4819fc19f96.zip | |
feat(schedule): add native track alongside sub and dub
Source the native (original-language) broadcast schedule from AnimeSchedule's "raw" airType and expose it as a third track on the schedule-page toggle and the GraphQL airing query.
Diffstat (limited to 'src/graphql/anime')
| -rw-r--r-- | src/graphql/anime/resolvers.ts | 7 | ||||
| -rw-r--r-- | src/graphql/anime/schema.graphql | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/graphql/anime/resolvers.ts b/src/graphql/anime/resolvers.ts index 8d87eb6c..d3d7801e 100644 --- a/src/graphql/anime/resolvers.ts +++ b/src/graphql/anime/resolvers.ts @@ -13,11 +13,12 @@ export const resolvers: WithIndex<AnimeResolvers> = { const token = env.ANIMESCHEDULE_CLIENT_TOKEN; const generatedAt = Math.floor(Date.now() / 1000); - if (!token) return { airing: { generatedAt, sub: [], dub: [] } }; + if (!token) + return { airing: { generatedAt, native: [], sub: [], dub: [] } }; - const { sub, dub } = await fetchTimetables(token); + const { native, sub, dub } = await fetchTimetables(token); - return { airing: { generatedAt, sub, dub } }; + return { airing: { generatedAt, native, sub, dub } }; }, }, }; diff --git a/src/graphql/anime/schema.graphql b/src/graphql/anime/schema.graphql index aad7afec..7ec6d6be 100644 --- a/src/graphql/anime/schema.graphql +++ b/src/graphql/anime/schema.graphql @@ -8,6 +8,7 @@ type Anime { type Airing { generatedAt: Int + native: [AiringRelease] sub: [AiringRelease] dub: [AiringRelease] } |