diff --git a/dub.json b/dub.json index 8e6e38a..d97722a 100644 --- a/dub.json +++ b/dub.json @@ -6,7 +6,6 @@ "dependencies" : { "fixedsizearray": ">=1.3.0", "vibe-d": ">=0.9.0", - "darser": ">=1.0.1", "nullablestore": ">=2.1.0" }, "dflags": [ "-d"], diff --git a/source/graphql/graphql.d b/source/graphql/graphql.d index ec03bad..1efe990 100644 --- a/source/graphql/graphql.d +++ b/source/graphql/graphql.d @@ -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 @@ -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