From 598ca8f138b3b37a81e959cac122c37a62ab8177 Mon Sep 17 00:00:00 2001 From: Doan-TrangNguyen Date: Mon, 16 Dec 2024 10:49:31 +0100 Subject: [PATCH] fix endless For-Loop because processTypes[def.Name] never true Co-authored-by: Jonathan Kohlhas --- querydocument/query_document.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/querydocument/query_document.go b/querydocument/query_document.go index f2ac85b..b1b8bdb 100644 --- a/querydocument/query_document.go +++ b/querydocument/query_document.go @@ -97,7 +97,8 @@ func collectInputObjectFieldsWithCycle(def *ast.Definition, schema *ast.Schema, return // この型は既に完全に処理済み } - usedTypes[def.Name] = true // この型を使用済みとしてマーク + processedTypes[def.Name] = true // この型の処理が完了したことをマーク + usedTypes[def.Name] = true // この型を使用済みとしてマーク for _, field := range def.Fields { var typeName string @@ -115,8 +116,6 @@ func collectInputObjectFieldsWithCycle(def *ast.Definition, schema *ast.Schema, } } } - - processedTypes[def.Name] = true // この型の処理が完了したことをマーク } // collectTypeFromTypeReference is a helper function to collect type names from type references