function resolvePages(data) {
  if (!data?.allSitePage?.nodes) {
    throw Error(
      `Page array from \`query\` wasn't found at \`data.allSitePage.nodes\`.
Fix the custom query or provide a custom \`resolvePages\` function.
https://www.gatsbyjs.com/plugins/gatsby-plugin-sitemap/#api-reference
      `
    )
  }

  return data.allSitePage.nodes
}
@name resolvePages

This allows custom resolution of the array of pages.
This also where user's could merge multiple sources into
a single array if needed.

@param {object} data - results of the GraphQL query
@returns {Array} - Array of objects representing each page