title: Fetching different data from the same query in GraphQL
body: <p>For background, we're using HotChocolate in C#, with Apollo Angular and graphql-codegen.</p>
  <p>We want to fetch some data from a query, but twice within one named query with different criteria, for instance:</p>
  <pre><code>
  query getTeamMembers($organisationId: UUID!, $cursor: String) {
      teamMembers(organisationId: $organisationId, after: $cursor) {
          pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
          }
          edges {
              cursor
              node {
                  ...teamMember
              }
          }
          totalCount
      }
      teamMembersWithSpecificCriteria: teamMembers(organisationId: $organisationId, after: $cursor, where: {...}
      ] }}) {
          totalCount
      }
  }
  
  </code></pre>
  <p>As you can see, this query (<code>getTeamMembers</code>) will fetch data from the same query resolver (<code>teamMembers</code>), but one is the entire dataset, the other is a subset of that data with a where clause.</p>
  <p>(I've had to blur/change some names for reasons).</p>
  <p>This seemingly <em>works</em> in the network request:</p>
  <p><a href="https://i.stack.imgur.com/KzNtr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KzNtr.png" alt="Network request" /></a></p>
  <p>but as you can see, both results have the same <code>__typename</code>, causing Apollo Angular to overwrite the data and set <code>23</code> for both:</p>
  <p><a href="https://i.stack.imgur.com/o2V80.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o2V80.png" alt="enter image description here" /></a></p>
  <p>The code we have looks like this:</p>
  <pre class="lang-js prettyprint-override"><code>
  this.teamMembersQuery = this.apollo.watchQuery&lt;GetTeamMembersQuery,
            GetTeamMembersQueryVariables&gt;({
            query: GetTeamMembersDocument,
            fetchPolicy: &quot;cache-and-network&quot;,
            variables: {
              organisationId: currentOrganisation?.id
            }
          });
  
          this.teamMembers$ = this.teamMembersQuery.valueChanges.pipe(
            map((result) =&gt; {
              this.cursor = result.data.teamMembers?.pageInfo.endCursor;
              this.hasNextPage = result.data.teamMembers?.pageInfo.hasNextPage;
              this.totalTeamMembersCount = result.data.teamMembers?.totalCount ?? 0;
              this.totalSpecificTeamMembersCount = result.data.teamMembersWithSpecificCriteria?.totalCount ?? 0;
              return result.data.teamMembers?.edges?.map((e) =&gt; e.node) ?? [];
            })
          );
  
  </code></pre>
  <p>Is there a way around this without having to create another query resolver on the server? Isn't this the entire point of GraphQL to be able to query different data like this?</p>
  <p>Any tips would be entirely helpful.</p>