@tmdb-graphql-api/resolvers 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -3434
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1 -3431
- package/dist/esm/index.mjs.map +1 -1
- package/dist/production.analysis.txt +882 -0
- package/dist/types/cjs/queries/tv.d.cts.map +1 -1
- package/dist/types/cjs/queries/tvRecommendations.d.cts +1 -1
- package/dist/types/cjs/queries/tvReviews.d.cts +1 -1
- package/dist/types/cjs/queries/tvSimilarTvShows.d.cts +1 -1
- package/dist/types/cjs/types.d.cts +1 -1
- package/dist/types/cjs/types.d.cts.map +1 -1
- package/dist/types/esm/queries/tv.d.ts.map +1 -1
- package/dist/types/esm/queries/tvRecommendations.d.ts +1 -1
- package/dist/types/esm/queries/tvReviews.d.ts +1 -1
- package/dist/types/esm/queries/tvSimilarTvShows.d.ts +1 -1
- package/dist/types/esm/types.d.ts +1 -1
- package/dist/types/esm/types.d.ts.map +1 -1
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/queries/tv.ts +7 -2
- package/src/types.ts +1 -1
package/package.json
CHANGED
package/src/queries/tv.ts
CHANGED
|
@@ -47,8 +47,13 @@ const appendToResponse = {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const enrichSeasonData = (obj: RawTv) => {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
// Although RawTv should always have seasons there are some
|
|
51
|
+
// instances where this is undefined and causes an exception.
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
53
|
+
if (obj.seasons) {
|
|
54
|
+
for (const season of obj.seasons) {
|
|
55
|
+
season.tv_show_id = obj.id;
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
59
|
|
package/src/types.ts
CHANGED
|
@@ -414,7 +414,7 @@ export type RawTv = SnakeCasedPropertiesDeep<
|
|
|
414
414
|
| 'videos'
|
|
415
415
|
| 'watchProviders'
|
|
416
416
|
>
|
|
417
|
-
> & { seasons
|
|
417
|
+
> & { seasons?: RawSeason[] };
|
|
418
418
|
|
|
419
419
|
export type RawTvWithAppendToResponse = RawTv & {
|
|
420
420
|
alternative_titles: Omit<RawTvAlternativeTitles, 'id'>;
|