title: Use GraphQL to retrieve an object that contains an array of objects with different schemas
body: <p>I am trying to write a query to retrieve an object with the property <code>linkedCards</code> that contains an array of objects with different schemas.</p>
  
  <p>I have 3 different schemas (built in <a href="https://www.contentful.com/" rel="noreferrer">Contentful</a>):</p>
  
  <p>CardA example:</p>
  
  <pre><code>{
      id: 42,
      productName: 'Laptop',
      price: 999
  }
  </code></pre>
  
  <p>CardB example:</p>
  
  <pre><code>{
      id: 999,
      title: 'Buy our refurbished Laptops today!'
  }
  </code></pre>
  
  <p>CardC example:</p>
  
  <pre><code>{
      id: 100,
      linkedCards: [
          {
              id: 42,
              productName: 'Laptop',
              price: 999
          },
          {
              id: 999,
              title: 'Buy our refurbished Laptops today!'
          }
      ]
  }
  </code></pre>
  
  <p>Query:</p>
  
  <pre><code>allCardC() {
      nodes {
          linkedCards {
              id
              title
          }
      }
  }
  </code></pre>
  
  <p>When I try to run the following GraphQL query I get
  <code>"Cannot query field "title" on type "CardACardBUnion". Did you mean to use an inline fragment on "CardA" or "CardB"?"</code></p>
  
  <p>Is there a built-in way to do this or can I use the ids of <code>CardA</code> &amp; <code>CardB</code> somehow? Perhaps have one query to get the ids of the cards in <code>linkedCards</code> and another query to get said cards?</p>