From 99c1d9af689e5325f3cf535c4007b3aeb8325229 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 10 Jan 2023 14:54:04 +0100 Subject: Update - This is an automated commit --- .../rules/KnownFragmentNamesRule.js.flow | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 alarm/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow (limited to 'alarm/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow') diff --git a/alarm/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow b/alarm/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow deleted file mode 100644 index 0c02736..0000000 --- a/alarm/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow +++ /dev/null @@ -1,26 +0,0 @@ -// @flow strict -import { GraphQLError } from '../../error/GraphQLError'; - -import type { ASTVisitor } from '../../language/visitor'; - -import type { ValidationContext } from '../ValidationContext'; - -/** - * Known fragment names - * - * A GraphQL document is only valid if all `...Fragment` fragment spreads refer - * to fragments defined in the same document. - */ -export function KnownFragmentNamesRule(context: ValidationContext): ASTVisitor { - return { - FragmentSpread(node) { - const fragmentName = node.name.value; - const fragment = context.getFragment(fragmentName); - if (!fragment) { - context.reportError( - new GraphQLError(`Unknown fragment "${fragmentName}".`, node.name), - ); - } - }, - }; -} -- cgit