Skip to content

Commit

Permalink
Fix #1203 Null input for slice should convert to nil rather than a em…
Browse files Browse the repository at this point in the history
…pty slice

not change IsNilable because other tests will fail if we do
  • Loading branch information
NateScarlet committed Jun 2, 2020
1 parent d3bfc92 commit 422ab49
Show file tree
Hide file tree
Showing 17 changed files with 118 additions and 3 deletions.
27 changes: 27 additions & 0 deletions codegen/testserver/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codegen/type.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
res, err := ec.{{ $type.Elem.UnmarshalFunc }}(ctx, v)
return &res, err
{{- else if $type.IsSlice }}
if v == nil { return nil, nil }
var vSlice []interface{}
if v != nil {
if tmp1, ok := v.([]interface{}); ok {
Expand Down
3 changes: 3 additions & 0 deletions example/chat/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions example/config/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions example/dataloader/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions example/federation/accounts/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions example/federation/products/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions example/federation/reviews/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions example/fileupload/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions example/scalars/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions example/selection/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions example/starwars/generated/exec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions example/todo/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions example/type-system-extension/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions integration/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion plugin/resolvergen/testdata/followschema/out/resolver.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package customresolver

// This file will not be regenerated automatically.
//
// It serves as dependency injection for your app, add any dependencies you require here.
package customresolver

type CustomResolverType struct{}
Loading

0 comments on commit 422ab49

Please sign in to comment.