@@ -113,7 +126,7 @@ function GqlTypeInfo({
const heading = (
{name}
- {description ?? 'No description'}
+ {description || 'No description'}
);
@@ -133,7 +146,11 @@ function GqlTypeInfo({
const fieldItem: ExplorerItem = { kind: 'field', type: field, from: item };
return (
-
+
);
})}
@@ -182,7 +199,7 @@ function GqlTypeInfo({
{values.map((v) => (
{v.value}
- {v.description ?? ''}
+ {v.description ?? null}
))}
@@ -204,7 +221,7 @@ function GqlTypeInfo({
{item.type.args.map((a) => (
@@ -231,7 +248,11 @@ function GqlTypeInfo({
};
return (
-
+
);
})}
@@ -254,7 +275,11 @@ function GqlTypeInfo({
};
return (
-
+
);
})}
@@ -274,7 +299,11 @@ function GqlTypeInfo({
const fieldItem: ExplorerItem = { kind: 'field', type: field, from: item };
return (
-
+
);
})}
@@ -295,7 +324,7 @@ function GqlTypeRow({
hideDescription,
}: {
item: ExplorerItem;
- name?: string;
+ name?: { value: string; color: Color };
description?: string | null;
setItem: (t: ExplorerItem) => void;
className?: string;
@@ -309,12 +338,26 @@ function GqlTypeRow({
child = (
<>
- {name && {name}:}{' '}
+ {name && (
+
+ {name.value}:
+
+ )}{' '}
{!hideDescription && (
- {(description === undefined ? getNamedType(item.type).description : description) ?? ''}
+ {(description === undefined ? getNamedType(item.type).description : description) ??
+ null}
)}
>
@@ -329,7 +372,7 @@ function GqlTypeRow({
- {name}
+ {name?.value}
{item.type.args.length > 0 && (
<>
@@ -353,21 +396,17 @@ function GqlTypeRow({
:{' '}
- {item.type.description && (
-
{item.type.description}
- )}
+
{item.type.description ?? null}
);
} else if (item.kind === 'input_field') {
child = (
<>
- {name && {name}:}{' '}
+ {name && {name.value}:}{' '}
- {item.type.description && (
-
{item.type.description}
- )}
+
{item.type.description ?? null}
>
);
}
@@ -443,3 +482,7 @@ function GqlTypeLabel({ item, children }: { item: ExplorerItem; children?: strin
function Subheading({ children }: { children: ReactNode }) {
return
{children}
;
}
+
+function Heading({ children }: { children: ReactNode }) {
+ return
{children}
;
+}
diff --git a/src-web/components/Markdown.tsx b/src-web/components/Markdown.tsx
index 52d2bd00..89e9b188 100644
--- a/src-web/components/Markdown.tsx
+++ b/src-web/components/Markdown.tsx
@@ -3,7 +3,14 @@ import remarkGfm from 'remark-gfm';
import { ErrorBoundary } from './ErrorBoundary';
import { Prose } from './Prose';
-export function Markdown({ children, className }: { children: string; className?: string }) {
+interface Props {
+ children: string | null;
+ className?: string;
+}
+
+export function Markdown({ children, className }: Props) {
+ if (children == null) return null;
+
return (