You don't need to make any code changes to your Gatsby project to get the enhancement, just upgrade the gatsby-source-datocms
package using your packet manager of choice (npm or Yarn), making sure you are installing a version higher than or equal to 2.4.0:
npm update gatsby-source-datocmsyarn upgrade gatsby-source-datocms
Enjoy!