From 23563c7188e089929b60f9e10721c6fc43a220ff Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 22 Jun 2023 23:06:12 +0200 Subject: Updated 15 files, added includes/maintenance/deleteUnusedAssets.php and deleted 4944 files (automated) --- .../rules/UniqueInputFieldNamesRule.js.flow | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 includes/external/school/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow (limited to 'includes/external/school/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow') diff --git a/includes/external/school/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow b/includes/external/school/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow deleted file mode 100644 index e79cd7a..0000000 --- a/includes/external/school/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow +++ /dev/null @@ -1,44 +0,0 @@ -// @flow strict -import { GraphQLError } from '../../error/GraphQLError'; - -import type { ASTVisitor } from '../../language/visitor'; - -import type { ASTValidationContext } from '../ValidationContext'; - -/** - * Unique input field names - * - * A GraphQL input object value is only valid if all supplied fields are - * uniquely named. - */ -export function UniqueInputFieldNamesRule( - context: ASTValidationContext, -): ASTVisitor { - const knownNameStack = []; - let knownNames = Object.create(null); - - return { - ObjectValue: { - enter() { - knownNameStack.push(knownNames); - knownNames = Object.create(null); - }, - leave() { - knownNames = knownNameStack.pop(); - }, - }, - ObjectField(node) { - const fieldName = node.name.value; - if (knownNames[fieldName]) { - context.reportError( - new GraphQLError( - `There can be only one input field named "${fieldName}".`, - [knownNames[fieldName], node.name], - ), - ); - } else { - knownNames[fieldName] = node.name; - } - }, - }; -} -- cgit