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

52 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-03-24 09:57:29 -04:00
import React, { Component } from 'react'
import { Provider } from 'react-redux'
2020-04-21 21:05:14 -04:00
import { Playground, store } from 'graphql-playground-react'
2019-03-24 09:57:29 -04:00
import './index.css'
2019-06-04 20:00:24 -04:00
const fetch = window.fetch
window.fetch = function() {
arguments[1].credentials = 'include'
return Promise.resolve(fetch.apply(global, arguments))
}
2019-03-24 09:57:29 -04:00
class App extends Component {
render() {
return (
<div>
<header style={{
2020-04-21 21:05:14 -04:00
color: 'lightblue',
2019-03-24 09:57:29 -04:00
letterSpacing: '0.15rem',
2020-04-21 21:05:14 -04:00
paddingTop: '10px',
paddingBottom: '0px'
2019-03-24 09:57:29 -04:00
}}
>
2020-04-21 21:05:14 -04:00
<div style={{
2019-03-24 09:57:29 -04:00
textDecoration: 'none',
margin: '0px',
2020-04-21 21:05:14 -04:00
fontSize: '14px',
fontWeight: '500',
2019-04-14 18:54:59 -04:00
textTransform: 'uppercase',
2019-12-10 00:03:44 -05:00
marginLeft: '10px',
2020-04-21 21:05:14 -04:00
}}
>Super Graph</div>
2019-03-24 09:57:29 -04:00
</header>
<Provider store={store}>
<Playground
endpoint="/api/v1/graphql"
2019-06-04 20:00:24 -04:00
settings="{
'schema.polling.enable': false,
'request.credentials': 'include',
'general.betaUpdates': true,
'editor.reuseHeaders': true,
}"
2019-03-24 09:57:29 -04:00
/>
</Provider>
</div>
);
}
}
export default App;