-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmagidoc.mjs
More file actions
52 lines (49 loc) · 1.11 KB
/
magidoc.mjs
File metadata and controls
52 lines (49 loc) · 1.11 KB
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
const { pages } = await import(`./magidoc/pages.mjs?id=${Math.random()}`)
const { STAGE_NAME } = process.env
let env
switch (STAGE_NAME) {
case 'sit':
env = '.sit'
break
case 'uat':
env = '.uat'
break
default:
env = ''
break
}
const url = `https://graphql${env}.earthdata.nasa.gov/api`
export default {
introspection: {
type: 'url',
url
// Uncomment to test introspection locally
// url: 'http://127.0.0.1:3013/api'
},
website: {
template: './magidoc-template',
staticAssets: './magidoc/assets',
options: {
appTitle: 'CMR GraphQL',
appLogo: '/cmr-graphql-logo.svg',
appFavicon: `https://cmr${env}.earthdata.nasa.gov/search/favicon.ico`,
siteRoot: '/docs',
pages,
externalLinks: [
{
href: 'https://github.com/nasa/cmr-graphql',
label: 'GitHub',
position: 'header',
kind: 'Github'
},
{
href: url,
label: 'API',
position: 'header'
}
],
fieldsSorting: 'alphabetical',
argumentsSorting: 'alphabetical'
}
}
}