From 4c375ed3e9f0bcfade74e6c07083098de12a8c24 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 15 Jul 2025 07:25:34 -0700 Subject: [PATCH] Tweak --- src-web/components/graphql/GraphQLDocsExplorer.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src-web/components/graphql/GraphQLDocsExplorer.tsx b/src-web/components/graphql/GraphQLDocsExplorer.tsx index a085607e..f6564980 100644 --- a/src-web/components/graphql/GraphQLDocsExplorer.tsx +++ b/src-web/components/graphql/GraphQLDocsExplorer.tsx @@ -67,17 +67,16 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({ if (showField === null) { setActiveItem(null); } else { + const isRootParentType = + showField.parentType === 'Query' || + showField.parentType === 'Mutation' || + showField.parentType === 'Subscription'; walkTypeGraph(schema, null, (t, from) => { - const isRootParentType = - showField.parentType === 'Query' || - showField.parentType === 'Mutation' || - showField.parentType === 'Subscription'; if ( showField.field === t.name && // For input fields, CodeMirror seems to set parentType to the root type of the field they belong to. (isRootParentType || from?.name === showField.parentType) ) { - console.log('SET FIELD', t, from); setActiveItem(toExplorerItem(t, toExplorerItem(from, null))); return false; } else if (showField.type === t.name && from?.name === showField.parentType) {