diff --git a/codegen/testserver/interfaces_test.go b/codegen/testserver/interfaces_test.go new file mode 100644 index 0000000000..d10f48b071 --- /dev/null +++ b/codegen/testserver/interfaces_test.go @@ -0,0 +1,16 @@ +package testserver + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestInterfaces(t *testing.T) { + t.Run("slices of interfaces are not pointers", func(t *testing.T) { + field, ok := reflect.TypeOf((*QueryResolver)(nil)).Elem().MethodByName("Shapes") + require.True(t, ok) + require.Equal(t, "[]testserver.Shape", field.Type.Out(0).String()) + }) +}