-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
54 lines (40 loc) · 1.06 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React from 'react';
import ReactDOM from 'react-dom';
import PrismaCms, {
loader,
} from "@prisma-cms/front";
import * as serviceWorker from './serviceWorker';
import App, {
// queryFragments,
} from "./App";
import {
UserNoNestingFragment,
} from "./schema/generated/api.fragments";
const node = document.getElementById('root');
if (node) {
loader({})
.then(() => {
ReactDOM.render(<PrismaCms
App={App}
apolloOptions={{
apiQuery: `{
user:me{
...UserNoNesting
EthAccounts {
id
address
balance(convert:ether)
}
}
}
${UserNoNestingFragment}
`,
}}
// queryFragments={queryFragments}
/>, node);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
})
}