Skip to content

Commit 57c9a30

Browse files
committed
Fix up nullable type
1 parent c898f0e commit 57c9a30

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Explorer.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,9 @@ class AbstractView extends React.PureComponent<AbstractViewProps, {}> {
13641364
? selection.selectionSet.selections
13651365
: []
13661366
: [];
1367+
13671368
return (
1368-
<div>
1369+
<div className={`graphiql-explorer-${implementingType.name}`}>
13691370
<span
13701371
style={{cursor: 'pointer'}}
13711372
onClick={selection ? this._removeFragment : this._addFragment}>
@@ -1464,7 +1465,9 @@ class FragmentView extends React.PureComponent<FragmentViewProps, {}> {
14641465
checked={!!selection}
14651466
styleConfig={this.props.styleConfig}
14661467
/>
1467-
<span style={{color: styleConfig.colors.def}}>
1468+
<span
1469+
style={{color: styleConfig.colors.def}}
1470+
className={`graphiql-explorer-${this.props.fragment.name.value}`}>
14681471
{this.props.fragment.name.value}
14691472
</span>
14701473
</span>
@@ -1743,7 +1746,8 @@ class FieldView extends React.PureComponent<
17431746

17441747
const applicableFragments =
17451748
isObjectType(type) || isInterfaceType(type) || isUnionType(type)
1746-
? this.props.availableFragments[type.name]
1749+
? this.props.availableFragments &&
1750+
this.props.availableFragments[type.name]
17471751
: null;
17481752

17491753
const node = (

0 commit comments

Comments
 (0)