Skip to content

Commit

Permalink
hideSuggestions exists on context
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Feb 26, 2025
1 parent 5053439 commit 794e73a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/execution/collectFields.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { AccumulatorMap } from '../jsutils/AccumulatorMap.js';
import type { Maybe } from '../jsutils/Maybe.js';
import type { ObjMap } from '../jsutils/ObjMap.js';

import type {
Expand Down Expand Up @@ -189,7 +188,6 @@ function collectFieldsImpl(
selection,
variableValues,
fragmentVariableValues,
hideSuggestions,
)
) {
continue;
Expand All @@ -208,7 +206,6 @@ function collectFieldsImpl(
selection,
variableValues,
fragmentVariableValues,
hideSuggestions,
) ||
!doesFragmentConditionMatch(schema, selection, runtimeType)
) {
Expand Down Expand Up @@ -255,7 +252,6 @@ function collectFieldsImpl(
selection,
variableValues,
fragmentVariableValues,
hideSuggestions,
)
) {
continue;
Expand Down Expand Up @@ -356,7 +352,6 @@ function shouldIncludeNode(
node: FragmentSpreadNode | FieldNode | InlineFragmentNode,
variableValues: VariableValues,
fragmentVariableValues: VariableValues | undefined,
hideSuggestions: Maybe<boolean>,
): boolean {
const skipDirectiveNode = node.directives?.find(
(directive) => directive.name.value === GraphQLSkipDirective.name,
Expand All @@ -371,7 +366,7 @@ function shouldIncludeNode(
GraphQLSkipDirective.args,
variableValues,
fragmentVariableValues,
hideSuggestions,
context.hideSuggestions,
)
: undefined;
if (skip?.if === true) {
Expand All @@ -391,7 +386,7 @@ function shouldIncludeNode(
GraphQLIncludeDirective.args,
variableValues,
fragmentVariableValues,
hideSuggestions,
context.hideSuggestions,
)
: undefined;
if (include?.if === false) {
Expand Down

0 comments on commit 794e73a

Please sign in to comment.