title: Feed result of one graphql query into another?
body: <p>Why I need to do this: I'm using graphql + gatsby + contentful. I'm using the rich text field in Contentful which allows to embed object references inside of markdown. I'd like to display the embedded entry. </p>
  
  <p>My query looks like this:</p>
  
  <pre><code>export const pageQuery = graphql`
    query BlogPostBySlug($slug: String!) {
        richTextField {
          content {
              nodeType
              data {
                  target {
                      sys {
                          id
                      }
                  }
              }
          }
        }
      }
    }
  `
  </code></pre>
  
  <p>The <code>richTextField.content</code> comes back looking like this:</p>
  
  <pre><code>{
    "data": {
      "target": {
        "sys": {
          "id": "5wVh2a6XvySacEioOEMyqQ",
        }
      }
    },
  }
  </code></pre>
  
  <p>The id, "5wVh2a6XvySacEioOEMyqQ", is a reference to another database entry. I can see two potential ways in how this might work:</p>
  
  <ol>
  <li><p>Some way of telling graphql that the id in the query refers to the other database model and have it autopopulate fields. Is this possible?</p></li>
  <li><p>Get the results of this query, collect all the ids and construct another query where it searches for entries with those ids. It seems like apollo might be a solution, but it doesn't work well with gatsby. Is this possible?</p></li>
  </ol>
  
  <p>What is the best way to do this?</p>
  
  <p>Thank you! :)</p>