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.
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:
Create the slice by adding a
slices/footer.js
file, or using thecreatePages
API action:Add a
<Slice />
component on your site, providing analias
string prop, wherealias
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
gatsby-cli
: Preserve verbosity in spawn child processes, via PR #36399gatsby-source-graphql
: we have “soft deprecated” this package in favor of other, CMS-specific source plugins- Note: You can continue to use this plugin for small sites or proof-of-concepts, but for larger sites backed by one or multiple CMSs we recommend using the official source plugin
- Read more on the README about the decision as well as the pull request
gatsby-plugin-mdx
gatsby-plugin-image
: Fix bug that preventsonLoad
being called on first load, via PR #36375
Contributors
A big Thank You to our community who contributed to this release 💜
- alexlouden: fix(gatsby-plugin-react-helmet): Typo in
onPreInit
warning PR #36419 - axe312ger: chore(docs): MDX v2 PR #35893
- mashehu: chore(docs): fix incorrect closing tag in tutorial PR #36459
- endymion1818: feat(docs): add webiny to headless cms list PR #36388
- that1matt: fix(gatsby-source-graphql): add dataLoaderOptions validation to gatsby-source-graphql PR #36112
- taiga39: chore(docs): Fix some typos PR #36431
- TalAter: chore(docs): Update plugin count in part 3 of the tutorial PR #36455
- Kornil
- ChefYeum: chore(docs): Fix page link to page 6 of remark tutorial PR #36437