Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.12.0+ breaks with pointer to slices that worked in v0.11.3 #1333

Closed
ananyasaxena opened this issue Sep 18, 2020 · 3 comments · Fixed by #1363
Closed

V0.12.0+ breaks with pointer to slices that worked in v0.11.3 #1333

ananyasaxena opened this issue Sep 18, 2020 · 3 comments · Fixed by #1363

Comments

@ananyasaxena
Copy link
Contributor

ananyasaxena commented Sep 18, 2020

In v0.11.3 pointers to slices would call the custom Marshal and Unmarshal methods for each element in the slice

v0.12.2 Breaks this functionality and calls the custom Marshal and Unmarshal with the entire slice

here is a sample code to reproduce this issue
https://github.com/ananyasaxena/gqlgen_err

It succeeds for v0.11.3
In v0.12.2 we get the following error

validation failed: packages.Load: /Users/ananya/gqltest/graphql_gen.go:1896:21: cannot convert tmp (variable of type string) to []item.Type
/Users/ananya/gqltest/graphql_gen.go:1904:38: cannot convert *v (variable of type []item.Type) to string
exit status 1

This issue seems to be reproducible from v0.12.0 onwards

@ananyasaxena ananyasaxena changed the title V0.12.2 breaks with pointer to slices that worked in v0.11.3 V0.12.0 breaks with pointer to slices that worked in v0.11.3 Sep 21, 2020
@carldunham
Copy link
Contributor

Still seeing this in 0.13.0

@ananyasaxena ananyasaxena changed the title V0.12.0 breaks with pointer to slices that worked in v0.11.3 V0.12.0+ breaks with pointer to slices that worked in v0.11.3 Oct 5, 2020
@carldunham
Copy link
Contributor

Any update? The PR looks helpful...

@ravisastryk
Copy link

Can we get these changes into a new release with the latest bits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants