diff --git a/gatsby-source-graphcms/gatsby-node.js b/gatsby-source-graphcms/gatsby-node.js index 77cb3f1..4914462 100644 --- a/gatsby-source-graphcms/gatsby-node.js +++ b/gatsby-source-graphcms/gatsby-node.js @@ -63,11 +63,7 @@ const createSourcingConfig = async ( (fieldName) => String(queryFields[fieldName].type) === `[${type.name}!]!` ) - const hasLocaleField = (type) => { - const fieldName = pluralRootFieldName(type) - - return queryFields[fieldName].args.some((arg) => arg.name === `locales`) - } + const hasLocaleField = (type) => type.getFields().locale const gatsbyNodeTypes = possibleTypes.map((type) => ({ remoteTypeName: type.name,