fixup! Race condition in parseGraphQLQuery result pooling

This commit is contained in:
2025-11-18 17:27:55 +00:00
parent 4e84cd7461
commit 94c097bc6c
2 changed files with 154 additions and 0 deletions
+11
View File
@@ -272,6 +272,17 @@ func processGraphQLRequest(c *fiber.Ctx) error {
// Parse the GraphQL query
parsedResult := parseGraphQLQuery(c)
// Debug logging for mutation routing analysis (enabled when LOG_LEVEL=DEBUG)
if cfg.LogLevel == "DEBUG" {
var m map[string]interface{}
if err := json.Unmarshal(c.Body(), &m); err == nil {
if query, ok := m["query"].(string); ok {
debugParseGraphQLQuery(c, query)
}
}
}
if parsedResult.shouldBlock {
return c.Status(fiber.StatusForbidden).SendString("Request blocked")
}