From 04b35fbf8fb1c091261b0bd2da7180d3747e9978 Mon Sep 17 00:00:00 2001 From: Robert burner Schadek Date: Tue, 14 May 2024 15:37:37 +0200 Subject: [PATCH] Fix ArrayResolver Variable passing --- source/graphql/graphql.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/graphql/graphql.d b/source/graphql/graphql.d index 1efe990..a8f78f3 100644 --- a/source/graphql/graphql.d +++ b/source/graphql/graphql.d @@ -532,6 +532,7 @@ class GraphQLD(T, QContext = DefaultContext) { field.name in (*arrayTypeResolverArray); if(arrayTypeResolver !is null) { + Json arguments = getArguments(field, variables); string fieldName = field.aka.empty ? field.name : field.aka; ec.path ~= PathElement(fieldName); scope(exit) { @@ -546,11 +547,11 @@ class GraphQLD(T, QContext = DefaultContext) { FieldRangeItem[] fri = fieldRangeArr(field.f.ss.sel, doc , interfacesForType(this.schema , nestedUnpacked.name) - , variables); + , arguments); fieldsHandledByArrayResolver ~= field.name; Json rslt = (*arrayTypeResolver)(field.name - , ParentArgs(objectValue, variables) + , ParentArgs(objectValue, arguments) , DocumentArgs(doc, field.f, fri) , context);