import { GrafaidOld } from '#lib/grafaid-old/index' import { Box, Flex, Heading } from '@radix-ui/themes' import { Obj } from '@wollybeard/kit' import type { GraphQLNamedType, GraphQLSchema } from 'graphql' import type { FC } from 'react' import { Link } from './Link.js' export interface Props { schema: GraphQLSchema } export const TypeIndex: FC = ({ schema }) => { const kindMap = GrafaidOld.getKindMap(schema) const sections = Obj.entries(kindMap.list) return ( {sections.map(([title, types]) => )} ) } const TypeSection: FC<{ title: string; types: GraphQLNamedType[] }> = ({ title, types }) => { return ( {title} ) } const TypeList: FC<{ types: GraphQLNamedType[] }> = ({ types }) => { return ( ( {types.map(type => ( {type.name} ))} ) ) }