title: Redux RTK Query: Invalidating only single element from list
body: <p>I have the following API defined for the RTK query:</p>
  <pre><code>export const postsApi = createApi({
    reducerPath: &quot;postsApi&quot;,
    baseQuery: fetchBaseQuery({ baseUrl: 'https://myservice.co/api/v2/' }),
    tagTypes: [&quot;Posts&quot;],
    endpoints: (builder) =&gt; ({
      getAllPosts: builder.query({
        query: () =&gt; ({ method: &quot;GET&quot;, url: &quot;/posts&quot; }),
        transformResponse: (response) =&gt; response.posts,
        providesTags: (result) =&gt;
          result
            ? [
                ...result.map(({ id }) =&gt; ({ type: &quot;Posts&quot;, id })),
                { type: &quot;Posts&quot;, id: &quot;LIST&quot; },
              ]
            : [{ type: &quot;Posts&quot;, id: &quot;LIST&quot; }],
      }),
      updatePost: builder.mutation({
        query: ({ postId, ...body }) =&gt; ({
          url: `/posts/${postId}`,
          method: &quot;POST&quot;,
          config: { body },
        }),
        invalidatesTags: (_, __, arg) =&gt; [{ type: &quot;Posts&quot;, id: arg.id }],
      }),
      getPost: builder.query({
        query: (postId) =&gt; ({
          method: &quot;GET&quot;,
          url: `/posts/${postId}`,
        }),
        providesTags: (_, __, id) =&gt; [{ type: &quot;Posts&quot;, id }],
      }),
    }),
  });
  
  export const { useGetAllPostsQuery, useUpdatePostMutation, useGetPostQuery } = postsApi;
  </code></pre>
  <p>What I would like this to do is that when updatePost is called succesfully, it would only invalidate cache for a single post and use the getPost query to refetch the information instead the getAllPosts. Is this anyway possible? The posts are shown in a table fetched with the getAllPosts query.</p>