From c210445f5dd2e12ea364ca30b9277f2a1277df2d Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Wed, 29 Mar 2017 14:49:04 -0700 Subject: [PATCH] Do not warn about legacy __configs__ name --- src/utilities/assertValidName.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/utilities/assertValidName.js b/src/utilities/assertValidName.js index 636f55590c..7c334a3df8 100644 --- a/src/utilities/assertValidName.js +++ b/src/utilities/assertValidName.js @@ -26,7 +26,16 @@ export function assertValidName( `Must be named. Unexpected name: ${name}.` ); } - if (!isIntrospection && name.slice(0, 2) === '__' && !hasWarnedAboutDunder) { + // For legacy reasons, __type__ and __configs__ should not generate a warning + // until the usage of these fields is cleaned up from the Facebook internal + // schemas. + if ( + !isIntrospection && + name.slice(0, 2) === '__' && + name !== '__configs__' && + name !== '__type__' && + !hasWarnedAboutDunder + ) { hasWarnedAboutDunder = true; /* eslint-disable no-console */ if (console && console.warn) {