Skip to content

Commit

Permalink
fix endless For-Loop because processTypes[def.Name] never true
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Kohlhas <JonathanKohlhas@users.noreply.github.com>
  • Loading branch information
Doan-Trang and JonathanKohlhas committed Dec 16, 2024
1 parent a7a49e8 commit 598ca8f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions querydocument/query_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 598ca8f

Please sign in to comment.