1
1
import { GraphQLClient } from 'graphql-request' ;
2
- import { RequestInit } from 'graphql-request/dist /types.dom' ;
2
+ import { RequestInit } from 'graphql-request/src /types.dom' ;
3
3
import { useMutation , useQuery , UseMutationOptions , UseQueryOptions } from '@tanstack/react-query' ;
4
4
export type Maybe < T > = T | null ;
5
5
export type InputMaybe < T > = Maybe < T > ;
@@ -24,6 +24,12 @@ export type Scalars = {
24
24
DateTime : any ;
25
25
} ;
26
26
27
+ export type ApiResponse = {
28
+ __typename ?: 'ApiResponse' ;
29
+ message : Scalars [ 'String' ] ;
30
+ success : Scalars [ 'Boolean' ] ;
31
+ } ;
32
+
27
33
export type LoginInput = {
28
34
email : Scalars [ 'String' ] ;
29
35
password : Scalars [ 'String' ] ;
@@ -36,20 +42,15 @@ export type LoginResponse = {
36
42
success : Scalars [ 'String' ] ;
37
43
} ;
38
44
39
- export type LogoutResponse = {
40
- __typename ?: 'LogoutResponse' ;
41
- message : Scalars [ 'String' ] ;
42
- success : Scalars [ 'String' ] ;
43
- } ;
44
-
45
45
export type Mutation = {
46
46
__typename ?: 'Mutation' ;
47
47
createPost : PostResponse ;
48
48
deletePost : PostDeleteResponse ;
49
49
loginUser : LoginResponse ;
50
50
registerUser : UserResponse ;
51
+ resetPassword : ResetPasswordResponse ;
51
52
updatePost : PostResponse ;
52
- updateUser : LogoutResponse ;
53
+ updateUser : ApiResponse ;
53
54
} ;
54
55
55
56
@@ -73,6 +74,11 @@ export type MutationRegisterUserArgs = {
73
74
} ;
74
75
75
76
77
+ export type MutationResetPasswordArgs = {
78
+ input : ResetPasswordInput ;
79
+ } ;
80
+
81
+
76
82
export type MutationUpdatePostArgs = {
77
83
id : Scalars [ 'String' ] ;
78
84
input : UpdatePostInput ;
@@ -104,7 +110,7 @@ export type PostDeleteResponse = {
104
110
export type PostFilter = {
105
111
limit : Scalars [ 'Float' ] ;
106
112
page : Scalars [ 'Float' ] ;
107
- title ?: InputMaybe < Scalars [ 'String' ] > ;
113
+ query ?: InputMaybe < Scalars [ 'String' ] > ;
108
114
} ;
109
115
110
116
export type PostInput = {
@@ -150,7 +156,7 @@ export type Query = {
150
156
getPost : PostPopulatedResponse ;
151
157
getPosts : PostListResponse ;
152
158
getProfile : UserResponse ;
153
- logoutUser : LogoutResponse ;
159
+ logoutUser : ApiResponse ;
154
160
refreshToken : LoginResponse ;
155
161
} ;
156
162
@@ -164,6 +170,18 @@ export type QueryGetPostsArgs = {
164
170
input ?: InputMaybe < PostFilter > ;
165
171
} ;
166
172
173
+ export type ResetPasswordInput = {
174
+ newPassword : Scalars [ 'String' ] ;
175
+ oldPassword : Scalars [ 'String' ] ;
176
+ } ;
177
+
178
+ export type ResetPasswordResponse = {
179
+ __typename ?: 'ResetPasswordResponse' ;
180
+ accessToken : Scalars [ 'String' ] ;
181
+ message : Scalars [ 'String' ] ;
182
+ success : Scalars [ 'Boolean' ] ;
183
+ } ;
184
+
167
185
export type #Input = {
168
186
email : Scalars [ 'String' ] ;
169
187
name : Scalars [ 'String' ] ;
@@ -255,7 +273,7 @@ export type LoginUserMutation = { __typename?: 'Mutation', loginUser: { __typena
255
273
export type LogoutUserQueryVariables = Exact < { [ key : string ] : never ; } > ;
256
274
257
275
258
- export type LogoutUserQuery = { __typename ?: 'Query' , logoutUser : { __typename ?: 'LogoutResponse ' , success : string , message : string } } ;
276
+ export type LogoutUserQuery = { __typename ?: 'Query' , logoutUser : { __typename ?: 'ApiResponse ' , success : boolean , message : string } } ;
259
277
260
278
export type RefreshTokenQueryVariables = Exact < { [ key : string ] : never ; } > ;
261
279
@@ -274,7 +292,7 @@ export type UpdateUserMutationVariables = Exact<{
274
292
} > ;
275
293
276
294
277
- export type UpdateUserMutation = { __typename ?: 'Mutation' , updateUser : { __typename ?: 'LogoutResponse ' , success : string , message : string } } ;
295
+ export type UpdateUserMutation = { __typename ?: 'Mutation' , updateUser : { __typename ?: 'ApiResponse ' , success : boolean , message : string } } ;
278
296
279
297
280
298
export const CreatePostDocument = `
0 commit comments