diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-17 00:48:08 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-17 00:48:08 +0200 |
commit | d571deef57b682f92e71f9374c2c59893db811af (patch) | |
tree | b17be26cfd358b1518010c9d7073fdbf0caa1561 /vendor/github.com/99designs/gqlgen/codegen/input.gotpl | |
parent | a89355e7fbcaaa5efb07d43c1f19a4be2e2c1537 (diff) | |
download | git-bug-d571deef57b682f92e71f9374c2c59893db811af.tar.gz |
vendor: upgrade github.com/99designs/gqlgen to v0.9.2
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/codegen/input.gotpl')
-rw-r--r-- | vendor/github.com/99designs/gqlgen/codegen/input.gotpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/99designs/gqlgen/codegen/input.gotpl b/vendor/github.com/99designs/gqlgen/codegen/input.gotpl index b51d53a2..bdf3622c 100644 --- a/vendor/github.com/99designs/gqlgen/codegen/input.gotpl +++ b/vendor/github.com/99designs/gqlgen/codegen/input.gotpl @@ -25,6 +25,10 @@ } if data, ok := tmp.({{ $field.TypeReference.GO | ref }}) ; ok { it.{{$field.GoFieldName}} = data + {{- if $field.TypeReference.IsNilable }} + } else if tmp == nil { + it.{{$field.GoFieldName}} = nil + {{- end }} } else { return it, fmt.Errorf(`unexpected type %T from directive, should be {{ $field.TypeReference.GO }}`, tmp) } |