From 827c26e88dca847c7faab6921bd5047e3688eb24 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 17 Nov 2023 22:29:42 +0000 Subject: [PATCH] Fix retrospection query blocking. --- graphql.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphql.go b/graphql.go index 384396d..5665537 100644 --- a/graphql.go +++ b/graphql.go @@ -94,6 +94,10 @@ func parseGraphQLQuery(c *fiber.Ctx) (operationType, operationName string, cache } } if cfg.Security.BlockIntrospection { + for _, retrospection_query := range retrospection_queries { + retrospectionQuerySet[strings.ToLower(retrospection_query)] = struct{}{} + } + for _, s := range oper.SelectionSet.Selections { for _, s2 := range s.GetSelectionSet().Selections { if _, exists := retrospectionQuerySet[strings.ToLower(s2.(*ast.Field).Name.Value)]; exists {