OneGraph / graphiql-explorer

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

add a 'deprecated' class to fields which have been marked as such #39

Closed TimLehner closed 4 years ago

TimLehner commented 4 years ago

This allows more flexible styling of deprecated fields, e.g. using the following CSS to strikethrough the deprecated fields:

.graphiql-explorer-node.deprecated {
  span {
    span {
      text-decoration: line-through;
      font-style: italic;
    }
  }
}
sgrove commented 4 years ago

This is great, thank you!

sgrove commented 4 years ago

Note that I changed the classname in #41 to be more specific and slightly changed where it was applied, graphiql-explorer-deprecated. This should make it less likely to collide with existing CSS and also make targeting just the field nodes easier.