-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Problem with @deprecated
directive in input fields
#1636
Comments
i try to debug this issue, i'm pretty sure this is gqlparser bug on this commit vektah/gqlparser@375e4cf, bug fix already merged but unfortunately not included on gqlparser@v2.2.0 which is used on gqlgen@0.14.0. i hope gqlparser maintainer can create new release so we can add it into gqlgen v0.15.0 or gqlgen v.0.14.1 |
This is definitely keeping me from updating as we use the deprecated directive all over our schema |
Here's the request for a new release in |
That issue has been open for a while, maybe we should fork the gqlparser into 99designs? |
Signed-off-by: Steve Coffman <steve@khanacademy.org>
Signed-off-by: Steve Coffman <steve@khanacademy.org>
I cut a new release for gqlparser, but it appears not to be that easy as it looks like the very first merge after the v2.2.0 release causes problems in gqlgen generate. |
Signed-off-by: Steve Coffman <steve@khanacademy.org>
Sorry this took so long. Should be good now! |
Thank you sooo much! |
This works! Thank you! How soon do you expect a new release of |
The error is not happening |
Yep it appears that the codegen supports this now but not the runtime introspection behavior |
PRs welcome! |
fwiw, this is only supported in the working draft gql spec: https://spec.graphql.org/draft/#sec--deprecated. The current spec only allows |
What happened?
After upgrading gqlgen (
v0.13.0
->v0.14.0
), when trying to generate models, I got an error related to the@deprecated
directive in input fields. I was checking and I'm not sure if it's a gqlgen or gqlparser bug (this second I don't think it's because they updated this directive in a recent commit).This error did not happen in the previous version (
v0.13.0
).What did you expect?
Generate models without problems
Minimal graphql.schema and models to reproduce
versions
gqlgen version
? v0.14.0go version
? go version go1.17 linux/amd64The text was updated successfully, but these errors were encountered: