You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// http GET /admin/post.json// response json: {"post": {"id": 123, "title": "the post"}}typePost={id: number;title: string;}typePostResponse={post: Post}exportconstapi=createApi({reducerPath: "api",baseQuery: fetchBaseQuery(),endpoints: (builder)=>({getPost: builder.query<Post,void>({query: ()=>`/admin/post.json`,transformResponse: (response: PostResponse)=>response.post,providesTags: ["post"],})})})// Some where in the appconstupdatedPost={id: 123,title: "My Post"}dispatch(api.util.upsertQueryData("getPost",updatedPost));// this not work, undefined body dispatch
I see it is breaking change from version 2.6.0, i also comment on the commit
The text was updated successfully, but these errors were encountered:
hieuvuvan
changed the title
rtkq api.util.upsertQueryData not work when has transformResponse
[RTK Query] api.util.upsertQueryData not work when has transformResponse
Apr 11, 2025
hieuvuvan
changed the title
[RTK Query] api.util.upsertQueryData not work when has transformResponse
[RTK Query] api.util.upsertQueryData not work correctly when has transformResponse
Apr 11, 2025
for example
I see it is breaking change from version 2.6.0, i also comment on the commit
The text was updated successfully, but these errors were encountered: