Create a Home Layout Component with a GraphQL Query in Gatsby

Share this video with your friends

Send Tweet

Starting with version 2 of Gatsby, a new StaticQuery component is available. This component allows you to make a GraphQL query and render the data it returns. In this lesson we will define a layout component that displays Header and Footer components with information from our site metadata.