Gatsby Book Launch

“The missing guide to the modern web” launches on Thursday, Sep 29th: Modular: The Web’s New Architecture

v4.22 Release Notes

Welcome to gatsby@4.22.0 release (August 2022 #3)

Key highlights of this release:

Also check out notable bugfixes.

Bleeding Edge: Want to try new features as soon as possible? Install gatsby@next and let us know if you have any issues.

Previous release notes

Full changelog


Open RFCs

Slices API

We are adding a new API that we are calling “Slices”. By using a new <Slice /> React component in combination with a src/slices directory or createSlice API for common UI features, Gatsby will be able to build and deploy individual pieces of your site that had content changes, not entire pages.

To create a slice, simply:

  1. Create the slice by adding a slices/footer.js file, or using the createPages API action:

  2. Add a <Slice /> component on your site, providing an alias string prop, where alias is either name of the file (in our case, footer). Any additional props passed will be handed down to the underlying component.

To read more, head over to RFC: Slices API. We appreciate any feedback there.

Changes in sort and aggregation fields in Gatsby GraphQL Schema

We are proposing Breaking Changes for the next major version of Gatsby to our GraphQL API. The goal of this change is increasing performance and reducing resource usage of builds. Proposed changes impact sort and aggregation fields (group, min, max, sum, distinct).

Basic example of proposed change:

Current:

Proposed:

To read more, head over to RFC: Change to sort and aggregation fields API. We appreciate any feedback there.

Notable bugfixes, improvements, & changes

  • gatsby
    • Add option to emit TypeScript types during gatsby build, via PR #36405
    • Fix issue where TypeScript retry mechanism would cause Windows to crash Gatsby while Parcel cache is open, via PR #36377
    • Prevent errors when the Head component has a root text node, via PR #36402
  • gatsby-cli: Preserve verbosity in spawn child processes, via PR #36399
  • gatsby-source-graphql: we have “soft deprecated” this package in favor of other, CMS-specific source plugins
  • gatsby-plugin-mdx
    • Fix issue with plugin options from e.g. gatsby-remark-images not getting passed through, via PR #36387
    • Fix issue with too long chunk names, via PR #36387
  • gatsby-plugin-image: Fix bug that prevents onLoad being called on first load, via PR #36375

Contributors

A big Thank You to our community who contributed to this release 💜

Edit this page on GitHub
© 2022 Gatsby, Inc.