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

@deprecated directive usage, reason not defaulting of No longer supported as per the spec #2691

Closed
arseniocosta1 opened this issue Jun 23, 2023 · 1 comment · Fixed by #2692

Comments

@arseniocosta1
Copy link
Contributor

arseniocosta1 commented Jun 23, 2023

What happened?

If you define a field as @deprecated without providing a reason one would expect the default value set to deprecationReason in the introspected schema to be as per the
spec with a value of No longer supported

What did you expect?

When deprecating a field without specifying a reason the introspection of the schema should set a
deprecationReason of No longer supported
`

type Customer {
  id: UUID!

 
  subscription: SubscriptionDetails! @deprecated
}

Minimal graphql.schema and models to reproduce

versions

  • go run github.com/99designs/gqlgen version?

v0.17.33

  • go version?
@arseniocosta1
Copy link
Contributor Author

arseniocosta1 commented Jun 23, 2023

I submitted #2692 which fixes it, but as I am quite new to the codebase I am not sure if, the fix is applied in the most correct place

Feel free to discard that PR or edit it

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