OneGraph / graphiql-explorer

Explorer plugin for GraphiQL
MIT License
904 stars 97 forks source link

graphiql-explorer-deprecated className not applied with graphql version 16.0.0 and up #91

Open haase1020 opened 1 year ago

haase1020 commented 1 year ago

Graphql.js removed the isDeprecated field from GraphQLField in version 16.0.0. Therefore, projects that use graphql v.16.0.0 and up will not have the graphiql-explorer-deprecated className applied, since there is a check for the isDeprecated field.

Recommendation: use the deprecationReason field instead:

    if (field.isDeprecated) {
      className += ' graphiql-explorer-deprecated';
    }

should instead be:

    if (field.deprecationReason) {
      className += ' graphiql-explorer-deprecated';
    }