Files
twenty/packages/twenty-website/src/app/developers/docs/graphql/page.tsx
T
Félix Malfait c422045ea6 Marketing improvements 3 (#3175)
* Improve marketing website

* User guide with icons

* Add TOC

* Linter

* Basic GraphQL playground

* Very basic contributors page

* Failed attempt to integrate REST playground

* Yarn

* Begin contributors DB

* Improve contributors page
2023-12-29 11:17:32 +01:00

27 lines
645 B
TypeScript

'use client';
import { createGraphiQLFetcher } from '@graphiql/toolkit';
import { GraphiQL } from 'graphiql';
import dynamic from 'next/dynamic';
import 'graphiql/graphiql.css';
// Create a named function for your component
function GraphiQLComponent() {
const fetcher = createGraphiQLFetcher({
url: 'https://api.twenty.com/graphql',
});
return <GraphiQL fetcher={fetcher} />;
}
// Dynamically import the GraphiQL component with SSR disabled
const GraphiQLWithNoSSR = dynamic(() => Promise.resolve(GraphiQLComponent), {
ssr: false,
});
const GraphQLDocs = () => {
return <GraphiQLWithNoSSR />;
};
export default GraphQLDocs;