aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-08-17 01:30:57 +0200
committerGitHub <noreply@github.com>2019-08-17 01:30:57 +0200
commit6428352bd14828f670206b60862de7f71c52d235 (patch)
treeac117a0360bcf03a948b373e2dfd34c61e932226 /vendor/github.com/99designs/gqlgen/codegen/field.gotpl
parenta3815d2ebb7d4a12d7b0db434b0b244e03e5e98a (diff)
parentd571deef57b682f92e71f9374c2c59893db811af (diff)
downloadgit-bug-6428352bd14828f670206b60862de7f71c52d235.tar.gz
Merge pull request #194 from MichaelMure/dependabot/dep/github.com/99designs/gqlgen-0.9.2
build(deps): bump github.com/99designs/gqlgen from 0.9.1 to 0.9.2
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/codegen/field.gotpl')
-rw-r--r--vendor/github.com/99designs/gqlgen/codegen/field.gotpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl b/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
index c0f6fcae..1970614b 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
@@ -107,6 +107,11 @@
if data, ok := tmp.({{ .TypeReference.GO | ref }}) ; ok {
return data, nil
}
+ {{- if .TypeReference.IsNilable -}}
+ else if tmp == nil {
+ return nil, nil
+ }
+ {{- end }}
return nil, fmt.Errorf(`unexpected type %T from directive, should be {{ .TypeReference.GO }}`, tmp)
{{- else -}}
ctx = rctx // use context from middleware stack in children