From 565228145a4a70127bc6e13c508f99dba5ba968f Mon Sep 17 00:00:00 2001 From: Stenio Wagner Date: Mon, 4 Dec 2023 15:42:19 -0300 Subject: [PATCH] feat: add the language to the movie-details/genres field --- graphql.schema.json | 15 ++++++++++++++- src/generated/graphql.ts | 7 ++++++- .../type-defs/schemas/tmdb/movie.schema.ts | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/graphql.schema.json b/graphql.schema.json index 07d40a7..a3956aa 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -1929,7 +1929,20 @@ { "name": "genres", "description": null, - "args": [], + "args": [ + { + "name": "language", + "description": null, + "type": { + "kind": "ENUM", + "name": "ISO6391Language", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "NON_NULL", "name": null, diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 269cdaf..fad2104 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -243,6 +243,11 @@ export type Movie = { }; +export type MovieGenresArgs = { + language?: InputMaybe; +}; + + export type MovieImagesArgs = { id: Scalars['Int']['input']; language?: InputMaybe; @@ -1291,7 +1296,7 @@ export type MovieResolvers, ParentType, ContextType>; cast?: Resolver, ParentType, ContextType>; crew?: Resolver, ParentType, ContextType>; - genres?: Resolver, ParentType, ContextType>; + genres?: Resolver, ParentType, ContextType, Partial>; homepage?: Resolver, ParentType, ContextType>; id?: Resolver; images?: Resolver, ParentType, ContextType, RequireFields>; diff --git a/src/graphql/type-defs/schemas/tmdb/movie.schema.ts b/src/graphql/type-defs/schemas/tmdb/movie.schema.ts index 1a63f79..7d8443b 100644 --- a/src/graphql/type-defs/schemas/tmdb/movie.schema.ts +++ b/src/graphql/type-defs/schemas/tmdb/movie.schema.ts @@ -18,7 +18,7 @@ export default `#graphql backdropPath: String belongsToCollection: MovieBelongsToCollection budget: Float - genres: [String!]! + genres(language: ISO6391Language): [String!]! homepage: String id: Int! imdbId: String