title: Splitting API Definitions with RTK Query
body: <p>I have <em>three</em> API definitions in my current scenario.</p>
  <ul>
  <li>Groups</li>
  <li>Group Members</li>
  <li>Group Invitations</li>
  </ul>
  <p>These routes relate to each other, in that accepting a group invitation will invalidate the list of groups a user has. As a result, I have defined them under the same API as they need to invalidate shared tags.</p>
  <p>However, this results in quite a bloated file, as each of those definitions have their own endpoints associated with them. Reading the documentation for <a href="https://redux-toolkit.js.org/rtk-query/usage/code-splitting" rel="nofollow noreferrer">Code Splitting</a> with RTK Query suggests using injectEndpoints. This looks like it will suit my purposes, but I've the documentation has no examples that I can find of how it should be implemented with multiple 'sub' endpoints.</p>
  <p>I have a couple questions;</p>
  <ol>
  <li>If I was to utilize injectEndpoints to extend the <em>Groups</em> API with GroupInvitations &amp; GroupMembers seperately, which API should be included in the call to configureScore?</li>
  <li>Is there a way to inject both endpoints into Groups at once, resulting in a single combinedApi?</li>
  </ol>