Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into introspec_test
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed Mar 18, 2024
2 parents 1c95abf + d843886 commit 5ea1132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dependencies" : {
"fixedsizearray": ">=1.3.0",
"vibe-d": ">=0.9.0",
"darser": ">=1.0.1",
"nullablestore": ">=2.1.0"
},
"dflags": [ "-d"],
Expand Down
9 changes: 9 additions & 0 deletions source/graphql/graphql.d
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ class GraphQLD(T, QContext = DefaultContext) {
this.executationTraceLog.logf("elemType %s", elemType);
Json ret = returnTemplate();
ret["data"] = Json.emptyArray();
if(Constants.errors in objectValue
&& !objectValue[Constants.errors].dataIsEmpty())
{
ret[Constants.errors] = Json.emptyArray();
foreach(err; objectValue[Constants.errors]) {
ret[Constants.errors] ~= err;
}
}

QueryArrayResolver[string]* arrayTypeResolverArray =
unPacked !is null
Expand All @@ -511,6 +519,7 @@ class GraphQLD(T, QContext = DefaultContext) {
Json[] results = iota(items.length)
.map!(it => returnTemplate())
.array;

string[] fieldsHandledByArrayResolver;
if(arrayTypeResolverArray !is null) {
FieldRange fr = fieldRange(ss, doc
Expand Down

0 comments on commit 5ea1132

Please sign in to comment.