graphql
graphql copied to clipboard
Why DeprecationReason is an empty string in introspection
I noticed that codegen, very popular tool to generate types from a schema, marks as deprecated all the possible types, queries, and mutations.
After some debugging I found out that the deprecationReason is returned by the introspection as an empty string.
For some reasons, codegen gives more importance to it than isDeprecated field (which is correctly set to false).
I checked around and I saw an old MR of @MarkKremer that fixed this problem.
But looking at the code now, it looks like that change has been reverted.
Any explanation for it?
I still think it makes sense to have the reason set to nil rather than an empty string.
If you would like me to solve this issue, either tag me in a comment or check this box:
- [ ] Solve Issue
You can disable automatic comments on my settings page