Skip to content

Commit

Permalink
Fix ArrayResolver Variable passing
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed May 14, 2024
1 parent 01e1d10 commit 04b35fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/graphql/graphql.d
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand Down

0 comments on commit 04b35fb

Please sign in to comment.