title: How to implement multiple api call in a single query with RTK query
body: <p>I'm new in RTK Query and I'm struggling with a use case I have to implement.</p>
  <p><strong>Scenario</strong>:
  I have to merge the results from two API calls: the first API call is a private API call while the second one is a public API call. I need to merge the responses from these two APIs and write the computed result into the RTK cache so the UI can update accordingly.</p>
  <p><strong>Problem</strong>:
  I'seeing that as soon as the <code>await queryFullfilled</code> is invoked, RTK Query immediately write into its cache the response from that API call and then when I make my calculation and try to update the RTK cache with <code>apiSlice.util.updateQueryData</code> the cache will change again. That's means that the UI will render twice, the first time using a wrong value (an array of persons) and the second time with the correct value (the JSON composed by ids and entities).</p>
  <p><strong>Question</strong>:
  Is there a way to have just 1 write into the RTK cache so I can have just the computed value I need ? Because what is happening is that for some instances I'm having into the cache an <code>array</code> while I need the <code>{ids: [...], entities: {}}</code> JSON.</p>
  <pre class="lang-js prettyprint-override"><code>import { createEntityAdapter } from '@reduxjs/toolkit';
  import axios from 'axios';
  
  export const personsAdapter = createEntityAdapter();
  const permitsInitialState = personsAdapter.getInitialState();
  
  export const apiSlice = myServiceApi.injectEndpoints({
    endpoints: (builder) =&gt; ({
      getPersons: builder.query({
        query: () =&gt; ({ url: '/persons', method: 'get' }),
        onQueryStarted: async (_, { dispatch, queryFulfilled }) =&gt; {
          try {
            // Resolving the private API call
            const { data: persons } = await queryFulfilled;
  
            // Just a random public API call
            const { data: todos } = await axios('https://jsonplaceholder.typicode.com/todos');
  
            const enhancedPersons = /** Here the logic that merge the todos and the persons */
  
            const state = personsAdapter.setAll(permitsInitialState, enhancedPermits);
  
            dispatch(
              apiSlice.util.updateQueryData('getPersons', _, (draft) =&gt; {
                Object.assign(draft, state);
              })
            );
          } catch (e) {
            console.error(e);
          }
        },
      }),
    }),
  });
  </code></pre>