Skip to content

Why DeprecationReason is an empty string in introspection #713

@alimoli

Description

@alimoli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions