super-graph/internal/serv/web/src/App.js

68 lines
1.6 KiB
JavaScript
Raw Normal View History

2019-03-24 14:57:29 +01:00
import React, { Component } from 'react'
import { Provider } from 'react-redux'
2019-06-05 02:00:24 +02:00
import { Playground, store } from '@apollographql/graphql-playground-react'
2019-03-24 14:57:29 +01:00
import './index.css'
2019-06-05 02:00:24 +02:00
const fetch = window.fetch
window.fetch = function() {
arguments[1].credentials = 'include'
return Promise.resolve(fetch.apply(global, arguments))
}
2019-03-24 14:57:29 +01:00
class App extends Component {
render() {
return (
<div>
<header style={{
2019-12-10 06:03:44 +01:00
background: '#09141b',
color: '#03a9f4',
2019-03-24 14:57:29 +01:00
letterSpacing: '0.15rem',
2019-04-15 00:54:59 +02:00
height: '65px',
display: 'flex',
alignItems: 'center'
2019-03-24 14:57:29 +01:00
}}
>
<h3 style={{
textDecoration: 'none',
margin: '0px',
2019-04-15 00:54:59 +02:00
fontSize: '18px',
2019-03-24 14:57:29 +01:00
}}
>
2019-04-15 00:54:59 +02:00
<span style={{
textTransform: 'uppercase',
2019-12-10 06:03:44 +01:00
marginLeft: '20px',
paddingRight: '10px',
borderRight: '1px solid #fff'
2019-04-15 00:54:59 +02:00
}}>
Super Graph
</span>
<span style={{
fontSize: '16px',
2019-12-10 06:03:44 +01:00
marginLeft: '10px',
color: '#fff'
2019-04-15 00:54:59 +02:00
}}>
Instant GraphQL</span>
</h3>
2019-03-24 14:57:29 +01:00
</header>
<Provider store={store}>
<Playground
endpoint="/api/v1/graphql"
2019-06-05 02:00:24 +02:00
settings="{
'schema.polling.enable': false,
'request.credentials': 'include',
'general.betaUpdates': true,
'editor.reuseHeaders': true,
'editor.theme': 'dark'
}"
2019-03-24 14:57:29 +01:00
/>
</Provider>
</div>
);
}
}
export default App;