Skip to content

Commit

Permalink
add a 'deprecated' class to fields which have been marked as such (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLehner authored and sgrove committed Jan 19, 2020
1 parent 69da97c commit 55b5837
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1233,8 +1233,14 @@ class FieldView extends React.PureComponent<FieldViewProps, {}> {
const selection = this._getSelection();
const type = unwrapOutputType(field.type);
const args = field.args.sort((a, b) => a.name.localeCompare(b.name));
let className = 'graphiql-explorer-node';

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

const node = (
<div className="graphiql-explorer-node">
<div className={className}>
<span
title={field.description}
style={{
Expand Down

0 comments on commit 55b5837

Please sign in to comment.