diff --git a/packages/gatsby-source-contentful/src/gatsby-node.js b/packages/gatsby-source-contentful/src/gatsby-node.js index 0d0889a8b0ff0..9da4419a90bcb 100644 --- a/packages/gatsby-source-contentful/src/gatsby-node.js +++ b/packages/gatsby-source-contentful/src/gatsby-node.js @@ -16,8 +16,6 @@ const { downloadContentfulAssets } = require(`./download-contentful-assets`) const conflictFieldPrefix = `contentful` -const restrictedContentTypes = [`entity`, `reference`] - exports.setFieldsOnGraphQLNodeType = require(`./extend-node-type`).extendNodeType const validateContentfulAccess = async pluginOptions => { @@ -306,30 +304,6 @@ exports.sourceNodes = async ( } } - // Check for restricted content type names - const useNameForId = pluginConfig.get(`useNameForId`) - - contentTypeItems.forEach(contentTypeItem => { - // Establish identifier for content type - // Use `name` if specified, otherwise, use internal id (usually a natural-language constant, - // but sometimes a base62 uuid generated by Contentful, hence the option) - let contentTypeItemId - if (useNameForId) { - contentTypeItemId = contentTypeItem.name.toLowerCase() - } else { - contentTypeItemId = contentTypeItem.sys.id.toLowerCase() - } - - if (restrictedContentTypes.includes(contentTypeItemId)) { - reporter.panic({ - id: CODES.FetchContentTypes, - context: { - sourceMessage: `Restricted ContentType name found. The name "${contentTypeItemId}" is not allowed.`, - }, - }) - } - }) - const allLocales = locales locales = locales.filter(pluginConfig.get(`localeFilter`)) reporter.verbose( diff --git a/packages/gatsby-source-contentful/src/report.js b/packages/gatsby-source-contentful/src/report.js index 5444a86693f60..985276124c839 100644 --- a/packages/gatsby-source-contentful/src/report.js +++ b/packages/gatsby-source-contentful/src/report.js @@ -23,9 +23,4 @@ export const ERROR_MAP = { level: `ERROR`, category: `THIRD_PARTY`, }, - [CODES.FetchContentTypes]: { - text: context => context.sourceMessage, - level: `ERROR`, - category: `THIRD_PARTY`, - }, }