@@ -73,6 +73,16 @@ export const postsApi = apiSlice.injectEndpoints({
73
73
getErrorProne : build . query < { success : boolean } , void > ( {
74
74
query : ( ) => 'error-prone' ,
75
75
} ) ,
76
+ getInfinitePosts : build . infiniteQuery < PostsResponse , void , number > ( {
77
+ queryFn : ( { pageParam = 0 } ) => ( {
78
+ data : [ ] ,
79
+ } ) ,
80
+ infiniteQueryOptions : {
81
+ initialPageParam : 0 ,
82
+ getNextPageParam : ( lastPage ) =>
83
+ lastPage . length === 0 ? undefined : lastPage [ lastPage . length - 1 ] . id ,
84
+ } ,
85
+ } ) ,
76
86
} ) ,
77
87
} )
78
88
@@ -87,6 +97,7 @@ export const {
87
97
useLazyGetErrorProneQuery,
88
98
useLazyGetPostQuery,
89
99
useLazyGetPostsQuery,
100
+ useGetInfinitePostsInfiniteQuery,
90
101
endpoints,
91
102
enhanceEndpoints,
92
103
injectEndpoints,
@@ -106,6 +117,7 @@ export const {
106
117
getPosts,
107
118
login,
108
119
updatePost,
120
+ getInfinitePosts,
109
121
} = endpoints
110
122
111
123
export const {
@@ -182,6 +194,19 @@ export const {
182
194
useMutation : _____useMutation ,
183
195
} = updatePost
184
196
197
+ export const {
198
+ Types : ______Types ,
199
+ initiate : ______initiate ,
200
+ matchFulfilled : ______matchFulfilled ,
201
+ matchPending : ______matchPending ,
202
+ matchRejected : ______matchRejected ,
203
+ name : ______name ,
204
+ select : ______select ,
205
+ useInfiniteQueryState : ______useQueryState ,
206
+ useInfiniteQuery : ______useQuery ,
207
+ useInfiniteQuerySubscription : ______useQuerySubscription ,
208
+ } = getInfinitePosts
209
+
185
210
export const {
186
211
internal_getRTKQSubscriptions,
187
212
middlewareRegistered,
0 commit comments