title: Allow optional GraphQL data in Gatsby for rich text
body: <p>I am almost able to create Hero banner images with different layouts depending on what fields are filled out in a headless CMS/Contentful. I am able to get data from Contentful endpoint and have optional fields for header titles(sting values) when defining types for them in advance in the gatsby-node.js file if/when Gatsby does not find them:</p>
  
  <pre><code>exports.createSchemaCustomization = ({ actions }) =&gt; {
    const { createTypes } = actions;
    const typeDefs = `
      type ContentfulHeroBannerSet implements Node {
        headerFirstLeft: String
        headerFirstCenter: String
        headerFirstRight: String
      }
    `;
    createTypes(typeDefs);
  };
  </code></pre>
  
  <p>And then checking their existence in React components renders them if they exist: </p>
  
  <pre><code> {item.node.headerRight &amp;&amp; (
                &lt;&gt;
                  &lt;Container
                    item
                    xs={6}
                    spacing={3}
                    className={classes.topContainer}
                  &gt;
  </code></pre>
  
  <p>Now I have added another optional field with rich text and I can not find out how to set the type definition for it in advance and Gatsby does not allow to build project before it finds automatically or in advance a type for subHeaderLeft. Heres the query in Index.js:</p>
  
  <pre><code>export const pageQuery = graphql`
    query HomeQuery {
      site {
        siteMetadata {
          title
        }
      }
      allContentfulHeroBannerSet(limit: 2) {
        edges {
          node {
            headerLeft
            headerCenter
            headerRight   //So far so good
            subHeaderLeft { // Here comes the problem
              childMarkdownRemark {
                html
              }
            }
  </code></pre>
  
  <p>ERROR: <strong>There was an error in your GraphQL query:</strong> Cannot query field "childMarkdownRemark" on type..
  It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "contentfulHeroBannerSetSubHeaderSecondLeftRichTextNode":
  <a href="https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions" rel="nofollow noreferrer">https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions</a>.</p>
  
  <p>Tried also to read through that docs page but still stuck. Dummy content would not suit as the idea is to have optional fields for content editors. Any ideas?</p>