@@ -5,7 +5,7 @@ export type InputMaybe<T> = Maybe<T>;
5
5
export type Exact < T extends { [ key : string ] : unknown } > = { [ K in keyof T ] : T [ K ] } ;
6
6
export type MakeOptional < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] ?: Maybe < T [ SubKey ] > } ;
7
7
export type MakeMaybe < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] : Maybe < T [ SubKey ] > } ;
8
- const defaultOptions = { }
8
+ const defaultOptions = { } as const ;
9
9
/** All built-in and custom scalars, mapped to their actual values */
10
10
export type Scalars = {
11
11
ID : string ;
@@ -76,31 +76,26 @@ export type MovieByIdQueryVariables = Exact<{
76
76
} > ;
77
77
78
78
79
- export type MovieByIdQuery = { __typename ?: 'Query' , movieById ?: { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null | undefined , favorite ?: boolean | null | undefined , cast ?: Array < { __typename ?: 'Credit' , id : string , name : string } > | null | undefined } | null | undefined } ;
79
+ export type MovieByIdQuery = { __typename ?: 'Query' , movieById ?: { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null , favorite ?: boolean | null , cast ?: Array < { __typename ?: 'Credit' , id : string , name : string } > | null } | null } ;
80
80
81
81
export type ToggleFavoriteMutationVariables = Exact < {
82
82
movieId : Scalars [ 'ID' ] ;
83
83
} > ;
84
84
85
85
86
- export type ToggleFavoriteMutation = { __typename ?: 'Mutation' , toggleFavoriteMovie ?: { __typename ?: 'Movie' , id : string , favorite ?: boolean | null | undefined } | null | undefined } ;
87
-
88
- export type NowPlayingQueryQueryVariables = Exact < { [ key : string ] : never ; } > ;
89
-
90
-
91
- export type NowPlayingQueryQuery = { __typename ?: 'Query' , nowPlaying ?: Array < { __typename ?: 'Movie' , id : string , title : string , overview : string } > | null | undefined } ;
92
-
93
- export type MovieFragment = { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null | undefined , favorite ?: boolean | null | undefined , popularity ?: string | null | undefined , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null | undefined } ;
86
+ export type ToggleFavoriteMutation = { __typename ?: 'Mutation' , toggleFavoriteMovie ?: { __typename ?: 'Movie' , id : string , favorite ?: boolean | null } | null } ;
94
87
95
88
export type NowPlayingQueryVariables = Exact < { [ key : string ] : never ; } > ;
96
89
97
90
98
- export type NowPlayingQuery = { __typename ?: 'Query' , nowPlaying ?: Array < { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null | undefined , favorite ?: boolean | null | undefined , popularity ?: string | null | undefined , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null | undefined } > | null | undefined } ;
91
+ export type NowPlayingQuery = { __typename ?: 'Query' , nowPlaying ?: Array < { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null , favorite ?: boolean | null , popularity ?: string | null , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null } > | null } ;
92
+
93
+ export type MovieFragment = { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null , favorite ?: boolean | null , popularity ?: string | null , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null } ;
99
94
100
95
export type PopularQueryVariables = Exact < { [ key : string ] : never ; } > ;
101
96
102
97
103
- export type PopularQuery = { __typename ?: 'Query' , popular ?: Array < { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null | undefined , favorite ?: boolean | null | undefined , popularity ?: string | null | undefined , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null | undefined } > | null | undefined } ;
98
+ export type PopularQuery = { __typename ?: 'Query' , popular ?: Array < { __typename ?: 'Movie' , id : string , title : string , overview : string , poster_path : string , backdrop_path ?: string | null , favorite ?: boolean | null , popularity ?: string | null , cast ?: Array < { __typename ?: 'Credit' , name : string } > | null } > | null } ;
104
99
105
100
export const MovieFragmentDoc = gql `
106
101
fragment Movie on Movie {
@@ -194,50 +189,23 @@ export function useToggleFavoriteMutation(baseOptions?: Apollo.MutationHookOptio
194
189
export type ToggleFavoriteMutationHookResult = ReturnType < typeof useToggleFavoriteMutation > ;
195
190
export type ToggleFavoriteMutationResult = Apollo . MutationResult < ToggleFavoriteMutation > ;
196
191
export type ToggleFavoriteMutationOptions = Apollo . BaseMutationOptions < ToggleFavoriteMutation , ToggleFavoriteMutationVariables > ;
197
- export const NowPlayingQueryDocument = gql `
198
- query nowPlayingQuery {
192
+ export const NowPlayingDocument = gql `
193
+ query nowPlaying {
199
194
nowPlaying {
200
195
id
201
196
title
202
197
overview
198
+ poster_path
199
+ backdrop_path
200
+ favorite
201
+ popularity
202
+ cast {
203
+ name
204
+ }
203
205
}
204
206
}
205
207
` ;
206
208
207
- /**
208
- * __useNowPlayingQueryQuery__
209
- *
210
- * To run a query within a React component, call `useNowPlayingQueryQuery` and pass it any options that fit your needs.
211
- * When your component renders, `useNowPlayingQueryQuery` returns an object from Apollo Client that contains loading, error, and data properties
212
- * you can use to render your UI.
213
- *
214
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
215
- *
216
- * @example
217
- * const { data, loading, error } = useNowPlayingQueryQuery({
218
- * variables: {
219
- * },
220
- * });
221
- */
222
- export function useNowPlayingQueryQuery ( baseOptions ?: Apollo . QueryHookOptions < NowPlayingQueryQuery , NowPlayingQueryQueryVariables > ) {
223
- const options = { ...defaultOptions , ...baseOptions }
224
- return Apollo . useQuery < NowPlayingQueryQuery , NowPlayingQueryQueryVariables > ( NowPlayingQueryDocument , options ) ;
225
- }
226
- export function useNowPlayingQueryLazyQuery ( baseOptions ?: Apollo . LazyQueryHookOptions < NowPlayingQueryQuery , NowPlayingQueryQueryVariables > ) {
227
- const options = { ...defaultOptions , ...baseOptions }
228
- return Apollo . useLazyQuery < NowPlayingQueryQuery , NowPlayingQueryQueryVariables > ( NowPlayingQueryDocument , options ) ;
229
- }
230
- export type NowPlayingQueryQueryHookResult = ReturnType < typeof useNowPlayingQueryQuery > ;
231
- export type NowPlayingQueryLazyQueryHookResult = ReturnType < typeof useNowPlayingQueryLazyQuery > ;
232
- export type NowPlayingQueryQueryResult = Apollo . QueryResult < NowPlayingQueryQuery , NowPlayingQueryQueryVariables > ;
233
- export const NowPlayingDocument = gql `
234
- query nowPlaying {
235
- nowPlaying {
236
- ...Movie
237
- }
238
- }
239
- ${ MovieFragmentDoc } ` ;
240
-
241
209
/**
242
210
* __useNowPlayingQuery__
243
211
*
0 commit comments