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

gqlparser/v2 2.2.0 Incompatability #1516

Closed
devotoare opened this issue Apr 14, 2021 · 12 comments
Closed

gqlparser/v2 2.2.0 Incompatability #1516

devotoare opened this issue Apr 14, 2021 · 12 comments

Comments

@devotoare
Copy link

What happened?

Updated github.com/vektah/gqlparser/v2 v2.1.0 to github.com/vektah/gqlparser/v2 v2.2.0 and the generate command started spitting out garbage:

go run github.com/99designs/gqlgen generate 
validation failed: packages.Load: /project/graph/prelude.resolvers.go:19:44: __DirectiveResolver not declared by package generated
exit status 1

Downgrading to v2.1.0 and removing the new prelude.resolvers.go file worked fine.

What did you expect?

Generate command to work.

Minimal graphql.schema and models to reproduce

Any

versions

  • gqlgen version: 0.13.0
  • go version : 1.16.3
  • dep or go modules: go modules
@lwc
Copy link
Member

lwc commented Apr 14, 2021

Hello, if you update gqlgen to the latest master and remove prelude.resolvers.go does the problem persist?

@devotoare
Copy link
Author

@lwc Just tested that, no the problem does not persist, works as expected.

@YannHulot
Copy link

I had the same issue. I reverted to 2.1.0 and it works. I 'll hold off updating this dep for a while until things settle down.

@dailytravel
Copy link

go get github.com/vektah/gqlparser/[email protected] and remove file prelude.resolvers.go, it's well!

@razorness
Copy link

Build fails with current master:

..\graph\resolver\prelude.resolvers.go:19:34: cannot refer to unexported name generated.__DirectiveResolver

@syssam
Copy link

syssam commented May 30, 2021

@vektah would you follow up?

@Araly
Copy link

Araly commented Jun 8, 2021

#1543 seems related

@pablote
Copy link

pablote commented Jul 12, 2021

is there a fix for this besides reverting to 2.1.0?

@benjaminjkraft
Copy link
Contributor

benjaminjkraft commented Jul 26, 2021

This looks to be fixed in master by f57d1a0 (#1514) .

@Araly
Copy link

Araly commented Aug 17, 2021

I still get the same issue as of now, when using gqlparser/v2 v2.2.0, specifically using https://github.com/Yamashou/gqlgenc if it's any relevant

@dailytravel
Copy link

dailytravel commented Aug 17, 2021 via email

@lwc
Copy link
Member

lwc commented Sep 17, 2021

Fixed in v0.14.0

@lwc lwc closed this as completed Sep 17, 2021
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

No branches or pull requests

9 participants