Skip to content

Commit 55b5837

Browse files
TimLehnersgrove
authored andcommitted
add a 'deprecated' class to fields which have been marked as such (#39)
1 parent 69da97c commit 55b5837

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Explorer.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,14 @@ class FieldView extends React.PureComponent<FieldViewProps, {}> {
12331233
const selection = this._getSelection();
12341234
const type = unwrapOutputType(field.type);
12351235
const args = field.args.sort((a, b) => a.name.localeCompare(b.name));
1236+
let className = 'graphiql-explorer-node';
1237+
1238+
if (field.isDeprecated) {
1239+
className += ' deprecated';
1240+
}
1241+
12361242
const node = (
1237-
<div className="graphiql-explorer-node">
1243+
<div className={className}>
12381244
<span
12391245
title={field.description}
12401246
style={{

0 commit comments

Comments
 (0)