'use client' import dynamic from 'next/dynamic' import { notFound } from 'next/navigation' import { type ComponentProps } from 'react' import { IS_DEV } from '~/lib/constants' const LazyGraphiQL = dynamic( async () => { const { GraphiQL: GraphiQLPrimitive } = await import('graphiql') const { createGraphiQLFetcher } = await import('@graphiql/toolkit') await import('graphiql/style.css') return function GraphiQL(props: Omit, 'fetcher'>) { const fetcher = createGraphiQLFetcher({ url: 'http://localhost:3001/docs/api/graphql', }) return } }, { loading: () =>
Loading GraphiQL...
, ssr: false, } ) export default function GraphiQLPage() { if (!IS_DEV) { notFound() } return }