Skip to content

Commit 562e1ef

Browse files
pantharshit00huv1k
authored andcommitted
fix: support non primitive types in default value via JSON.strigify (#914)
1 parent 648dddf commit 562e1ef

File tree

1 file changed

+1
-1
lines changed
  • packages/graphql-playground-react/src/components/Playground/DocExplorer

1 file changed

+1
-1
lines changed

packages/graphql-playground-react/src/components/Playground/DocExplorer/TypeLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class TypeLink extends React.Component<
166166
{type.defaultValue !== undefined ? (
167167
<DefaultValue>
168168
{' '}
169-
= <span>{`${type.defaultValue}`}</span>
169+
= <span>{`${JSON.stringify(type.defaultValue, null, 2)}`}</span>
170170
</DefaultValue>
171171
) : (
172172
undefined

0 commit comments

Comments
 (0)