Add docs CI and fix docs build (#176)
* Add docs CI and fix docs build * Fix CI name
This commit is contained in:
@ -3,16 +3,24 @@ import { GraphiQL } from 'graphiql';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Layout from '@theme/Layout';
|
||||
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||
|
||||
import 'graphiql/graphiql.css';
|
||||
|
||||
const fetcher = createGraphiQLFetcher({ url: 'https://api.twenty.com/graphql' });
|
||||
|
||||
// Docusaurus does SSR for custom pages but we need to load GraphiQL in the browser
|
||||
function GraphiQLComponent() {
|
||||
const fetcher = createGraphiQLFetcher({ url: 'https://api.twenty.com/graphql' });
|
||||
return <GraphiQL fetcher={fetcher} />;
|
||||
}
|
||||
|
||||
export default function graphQL() {
|
||||
return (
|
||||
<Layout title="Hello" description="Hello React Page">
|
||||
<div class="fullHeightPlayground">
|
||||
<GraphiQL fetcher={fetcher} />
|
||||
<div className="fullHeightPlayground">
|
||||
<BrowserOnly>
|
||||
<GraphiQLComponent />
|
||||
</BrowserOnly>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user