create-graphql-markdown-docs 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -2
- package/bin/create.mjs +5 -0
- package/lib/create.mjs +845 -0
- package/package.json +60 -4
- package/templates/docusaurus/.graphqlrc +13 -0
- package/templates/docusaurus/README.md +31 -0
- package/templates/docusaurus/babel.config.js +3 -0
- package/templates/docusaurus/docs/.gitkeep +0 -0
- package/templates/docusaurus/docusaurus.config.js +65 -0
- package/templates/docusaurus/package.json +45 -0
- package/templates/docusaurus/schema/example.graphql +55 -0
- package/templates/docusaurus/src/css/custom.css +39 -0
- package/templates/docusaurus/static/.nojekyll +0 -0
- package/templates/docusaurus/static/img/favicon.ico +0 -0
- package/templates/docusaurus/static/img/graphql-markdown.svg +204 -0
- package/templates/docusaurus/static/index.md +28 -0
- package/templates/nuxt/README.md +64 -0
- package/templates/nuxt/app/app.config.ts +11 -0
- package/templates/nuxt/app/pages/index.vue +10 -0
- package/templates/nuxt/content.config.ts +13 -0
- package/templates/nuxt/generate-docs.ts +5 -0
- package/templates/nuxt/nuxt.config.ts +8 -0
- package/templates/nuxt/package.json +25 -0
- package/templates/nuxt/schema/example.graphql +55 -0
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-graphql-markdown-docs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Create a new GraphQL API documentation site with GraphQL Markdown and Nuxt or Docusaurus",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://graphql-markdown.dev",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/graphql-markdown/graphql-markdown/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/graphql-markdown/graphql-markdown.git",
|
|
13
|
+
"directory": "packages/create-graphql-markdown-docs"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"create",
|
|
17
|
+
"nuxt",
|
|
18
|
+
"docusaurus",
|
|
19
|
+
"graphql",
|
|
20
|
+
"documentation",
|
|
21
|
+
"cli",
|
|
22
|
+
"scaffold"
|
|
23
|
+
],
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "Gregory Heitz"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"bin": {
|
|
29
|
+
"create-graphql-markdown-docs": "./bin/create.mjs"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "echo \"no build step — bin/, lib/ and templates/ ship as source\"",
|
|
33
|
+
"lint": "eslint --config ../../packages/tooling-config/eslint/config.ts \"bin/**/*.mjs\" \"lib/**/*.mjs\" \"tests/**/*.ts\"",
|
|
34
|
+
"lint:fix": "eslint --config ../../packages/tooling-config/eslint/config.ts \"bin/**/*.mjs\" \"lib/**/*.mjs\" \"tests/**/*.ts\" --fix",
|
|
35
|
+
"prettier": "prettier \"bin/**/*.mjs\" \"lib/**/*.mjs\" \"tests/**/*.ts\" --check",
|
|
36
|
+
"prettier:fix": "prettier \"bin/**/*.mjs\" \"lib/**/*.mjs\" \"tests/**/*.ts\" --write",
|
|
37
|
+
"test": "vitest run --passWithNoTests",
|
|
38
|
+
"test:unit": "vitest run --passWithNoTests tests/unit",
|
|
39
|
+
"test:integration": "vitest run --passWithNoTests tests/integration",
|
|
40
|
+
"test:ci": "vitest run --passWithNoTests --silent --sequence.shuffle",
|
|
41
|
+
"test:e2e": "GQLMD_CLI_E2E=1 vitest run tests/integration/e2e-build.test.ts"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"bin",
|
|
45
|
+
"lib",
|
|
46
|
+
"templates"
|
|
47
|
+
],
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@clack/prompts": "^1.0.0",
|
|
50
|
+
"graphql": "^16.8.0",
|
|
51
|
+
"package-manager-detector": "^1.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@graphql-markdown/tooling-config": ""
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=22.12.0"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
schema: './schema/example.graphql'
|
|
2
|
+
extensions:
|
|
3
|
+
graphql-markdown:
|
|
4
|
+
baseURL: '.'
|
|
5
|
+
homepage: 'static/index.md'
|
|
6
|
+
loaders:
|
|
7
|
+
GraphQLFileLoader: '@graphql-tools/graphql-file-loader'
|
|
8
|
+
docOptions:
|
|
9
|
+
frontMatter:
|
|
10
|
+
pagination_next: null
|
|
11
|
+
pagination_prev: null
|
|
12
|
+
printTypeOptions:
|
|
13
|
+
deprecated: 'group'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# GraphQL-Markdown docs
|
|
2
|
+
|
|
3
|
+
Docusaurus site generated with [GraphQL-Markdown](https://graphql-markdown.dev).
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
### 1. Generate
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm run doc
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### 2. Start
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
npm start
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Your GraphQL Schema
|
|
20
|
+
|
|
21
|
+
The schema is configured in `.graphqlrc` (see the [documentation](https://graphql-markdown.dev/docs/configuration#graphql-config)). By default it reads the bundled `schema/example.graphql`:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
schema: './schema/example.graphql'
|
|
25
|
+
extensions:
|
|
26
|
+
graphql-markdown:
|
|
27
|
+
loaders:
|
|
28
|
+
GraphQLFileLoader: '@graphql-tools/graphql-file-loader'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
To change it, update `schema` (a local file, or a URL, `git:` or `github:` reference) and install and declare the matching [graphql-tools loader](https://github.com/ardatan/graphql-tools/tree/master/packages/loaders) under `loaders`, e.g. `UrlLoader: '@graphql-tools/url-loader'`. Then run `npm run doc` again.
|
|
File without changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
// Note: type annotations allow type checking and IDEs autocompletion
|
|
3
|
+
|
|
4
|
+
const { themes } = require("prism-react-renderer");
|
|
5
|
+
const lightCodeTheme = themes.github,
|
|
6
|
+
darkCodeTheme = themes.dracula;
|
|
7
|
+
|
|
8
|
+
/** @type {import('@docusaurus/types').Config} */
|
|
9
|
+
const config = {
|
|
10
|
+
title: "My API",
|
|
11
|
+
tagline: "GraphQL-Markdown is cool",
|
|
12
|
+
url: "https://your-docusaurus-test-site.com",
|
|
13
|
+
baseUrl: "/",
|
|
14
|
+
trailingSlash: false,
|
|
15
|
+
onBrokenLinks: "throw",
|
|
16
|
+
favicon: "img/favicon.ico",
|
|
17
|
+
organizationName: "graphql-markdown", // Usually your GitHub org/user name.
|
|
18
|
+
projectName: "graphql-markdown-template", // Usually your repo name.
|
|
19
|
+
plugins: ["@graphql-markdown/docusaurus"], // See .graphqlrc for configuration
|
|
20
|
+
presets: [
|
|
21
|
+
[
|
|
22
|
+
"classic",
|
|
23
|
+
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
24
|
+
({
|
|
25
|
+
blog: false,
|
|
26
|
+
docs: {
|
|
27
|
+
routeBasePath: "/",
|
|
28
|
+
},
|
|
29
|
+
theme: {
|
|
30
|
+
customCss: "./src/css/custom.css",
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
],
|
|
35
|
+
|
|
36
|
+
themeConfig:
|
|
37
|
+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
38
|
+
({
|
|
39
|
+
navbar: {
|
|
40
|
+
title: "GraphQL-Markdown",
|
|
41
|
+
logo: {
|
|
42
|
+
alt: "graphql-markdown",
|
|
43
|
+
src: "img/graphql-markdown.svg"
|
|
44
|
+
},
|
|
45
|
+
items: [
|
|
46
|
+
{
|
|
47
|
+
href: "https://github.com/graphql-markdown/graphql-markdown",
|
|
48
|
+
label: "GitHub",
|
|
49
|
+
position: "right"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
footer: {
|
|
54
|
+
style: "light",
|
|
55
|
+
links: [],
|
|
56
|
+
copyright: `Copyright © ${new Date().getFullYear()} My Website, Inc. Built with GraphQL-Markdown & Docusaurus.`
|
|
57
|
+
},
|
|
58
|
+
prism: {
|
|
59
|
+
theme: lightCodeTheme,
|
|
60
|
+
darkTheme: darkCodeTheme
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
module.exports = config;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "graphql-markdown-docs",
|
|
3
|
+
"private": true,
|
|
4
|
+
"scripts": {
|
|
5
|
+
"docusaurus": "docusaurus",
|
|
6
|
+
"start": "docusaurus start",
|
|
7
|
+
"build": "docusaurus build",
|
|
8
|
+
"swizzle": "docusaurus swizzle",
|
|
9
|
+
"deploy": "docusaurus deploy",
|
|
10
|
+
"clear": "docusaurus clear",
|
|
11
|
+
"serve": "docusaurus serve",
|
|
12
|
+
"dev": "docusaurus start",
|
|
13
|
+
"doc": "docusaurus graphql-to-doc"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@docusaurus/core": "^3.10.0",
|
|
17
|
+
"@docusaurus/preset-classic": "^3.10.0",
|
|
18
|
+
"@graphql-markdown/docusaurus": "^1.38.0",
|
|
19
|
+
"@graphql-tools/graphql-file-loader": "^8.0.0",
|
|
20
|
+
"@mdx-js/react": "^3.1.1",
|
|
21
|
+
"graphql": "^16.13.2",
|
|
22
|
+
"graphql-config": "^5.1.6",
|
|
23
|
+
"prism-react-renderer": "^2.4.1",
|
|
24
|
+
"react": "^19.0.0",
|
|
25
|
+
"react-dom": "^19.0.0"
|
|
26
|
+
},
|
|
27
|
+
"browserslist": {
|
|
28
|
+
"production": [
|
|
29
|
+
">0.5%",
|
|
30
|
+
"not dead",
|
|
31
|
+
"not op_mini all"
|
|
32
|
+
],
|
|
33
|
+
"development": [
|
|
34
|
+
"last 1 chrome version",
|
|
35
|
+
"last 1 firefox version",
|
|
36
|
+
"last 1 safari version"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20.0"
|
|
41
|
+
},
|
|
42
|
+
"overrides": {
|
|
43
|
+
"webpackbar": "^7.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A simple example GraphQL schema demonstrating the GraphQL Markdown theme.
|
|
3
|
+
"""
|
|
4
|
+
scalar DateTime
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
The root query type for the API.
|
|
8
|
+
"""
|
|
9
|
+
type Query {
|
|
10
|
+
"""
|
|
11
|
+
Retrieve a user by their ID.
|
|
12
|
+
"""
|
|
13
|
+
user(id: ID!): User
|
|
14
|
+
|
|
15
|
+
"""
|
|
16
|
+
List all available users.
|
|
17
|
+
"""
|
|
18
|
+
users: [User!]!
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
A user in the system.
|
|
23
|
+
"""
|
|
24
|
+
type User {
|
|
25
|
+
"""
|
|
26
|
+
The unique identifier for this user.
|
|
27
|
+
"""
|
|
28
|
+
id: ID!
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
The user's name.
|
|
32
|
+
"""
|
|
33
|
+
name: String!
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
The user's email address.
|
|
37
|
+
"""
|
|
38
|
+
email: String!
|
|
39
|
+
|
|
40
|
+
"""
|
|
41
|
+
When this user account was created.
|
|
42
|
+
"""
|
|
43
|
+
createdAt: DateTime!
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
The user's profile picture URL.
|
|
47
|
+
@deprecated Use `avatar` instead.
|
|
48
|
+
"""
|
|
49
|
+
profilePictureUrl: String @deprecated(reason: "Use avatar field instead")
|
|
50
|
+
|
|
51
|
+
"""
|
|
52
|
+
The user's avatar profile picture.
|
|
53
|
+
"""
|
|
54
|
+
avatar: String
|
|
55
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Any CSS included here will be global. The classic template
|
|
3
|
+
* bundles Infima by default. Infima is a CSS framework designed to
|
|
4
|
+
* work well for content-centric websites.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* You can override the default Infima variables here. */
|
|
8
|
+
:root {
|
|
9
|
+
--ifm-color-primary: #2e8555;
|
|
10
|
+
--ifm-color-primary-dark: #29784c;
|
|
11
|
+
--ifm-color-primary-darker: #277148;
|
|
12
|
+
--ifm-color-primary-darkest: #205d3b;
|
|
13
|
+
--ifm-color-primary-light: #33925d;
|
|
14
|
+
--ifm-color-primary-lighter: #359962;
|
|
15
|
+
--ifm-color-primary-lightest: #3cad6e;
|
|
16
|
+
--ifm-code-font-size: 95%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
20
|
+
html[data-theme='dark'] {
|
|
21
|
+
--ifm-color-primary: #25c2a0;
|
|
22
|
+
--ifm-color-primary-dark: #21af90;
|
|
23
|
+
--ifm-color-primary-darker: #1fa588;
|
|
24
|
+
--ifm-color-primary-darkest: #1a8870;
|
|
25
|
+
--ifm-color-primary-light: #29d5b0;
|
|
26
|
+
--ifm-color-primary-lighter: #32d8b4;
|
|
27
|
+
--ifm-color-primary-lightest: #4fddbf;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.docusaurus-highlight-code-line {
|
|
31
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
32
|
+
display: block;
|
|
33
|
+
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
34
|
+
padding: 0 var(--ifm-pre-padding);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
html[data-theme='dark'] .docusaurus-highlight-code-line {
|
|
38
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
39
|
+
}
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
inkscape:export-ydpi="96"
|
|
11
|
+
inkscape:export-xdpi="96"
|
|
12
|
+
inkscape:export-filename="/Users/gregory.heitz/Downloads/graphql-markdown.png"
|
|
13
|
+
inkscape:version="1.0beta2 (2b71d25, 2019-12-03)"
|
|
14
|
+
sodipodi:docname="graphql-markdown.svg"
|
|
15
|
+
xml:space="preserve"
|
|
16
|
+
enable-background="new 0 0 400 400"
|
|
17
|
+
viewBox="0 0 400 400"
|
|
18
|
+
y="0px"
|
|
19
|
+
x="0px"
|
|
20
|
+
id="GraphQL_Logo"
|
|
21
|
+
version="1.1"><metadata
|
|
22
|
+
id="metadata1109"><rdf:RDF><cc:Work
|
|
23
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
24
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
|
25
|
+
id="defs1107" /><sodipodi:namedview
|
|
26
|
+
inkscape:current-layer="g1102"
|
|
27
|
+
inkscape:window-maximized="0"
|
|
28
|
+
inkscape:window-y="25"
|
|
29
|
+
inkscape:window-x="0"
|
|
30
|
+
inkscape:cy="42.149101"
|
|
31
|
+
inkscape:cx="123.08885"
|
|
32
|
+
inkscape:zoom="1.36"
|
|
33
|
+
showgrid="false"
|
|
34
|
+
id="namedview1105"
|
|
35
|
+
inkscape:window-height="1387"
|
|
36
|
+
inkscape:window-width="1720"
|
|
37
|
+
inkscape:pageshadow="2"
|
|
38
|
+
inkscape:pageopacity="0"
|
|
39
|
+
guidetolerance="10"
|
|
40
|
+
gridtolerance="10"
|
|
41
|
+
objecttolerance="10"
|
|
42
|
+
borderopacity="1"
|
|
43
|
+
inkscape:document-rotation="0"
|
|
44
|
+
bordercolor="#666666"
|
|
45
|
+
pagecolor="#ffffff" />
|
|
46
|
+
<g
|
|
47
|
+
id="g1102">
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<g
|
|
64
|
+
style="fill:#374845;stroke:#374845"
|
|
65
|
+
id="g1734"><path
|
|
66
|
+
id="path1026"
|
|
67
|
+
d="M 126.91176,235.73529 V 104.50001 h 36.54412 L 200,152.74828 236.54411,104.50001 h 36.54412 l 0,167.63234 -35.44118,-2.57353 L 236.54411,160.468 200,208.71626 163.45588,160.468 v 75.26729 z"
|
|
68
|
+
inkscape:connector-curvature="0"
|
|
69
|
+
sodipodi:nodetypes="ccccccccccccc"
|
|
70
|
+
style="stroke-width:1.87787;fill:#374845;stroke:#374845" /><path
|
|
71
|
+
id="path1026-7"
|
|
72
|
+
d="m 257.13236,303.59948 -38.08824,-51.55537 c 76.17647,0 0,0 76.17647,0 z"
|
|
73
|
+
inkscape:connector-curvature="0"
|
|
74
|
+
sodipodi:nodetypes="cccc"
|
|
75
|
+
style="stroke-width:1.40836;fill:#374845;stroke:#374845" /></g><g
|
|
76
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
77
|
+
id="g1726"><g
|
|
78
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
79
|
+
id="g1052">
|
|
80
|
+
<g
|
|
81
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
82
|
+
id="g1050">
|
|
83
|
+
|
|
84
|
+
<rect
|
|
85
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
86
|
+
x="37.9"
|
|
87
|
+
y="312.2"
|
|
88
|
+
transform="matrix(-0.866 -0.5 0.5 -0.866 83.0693 663.3409)"
|
|
89
|
+
fill="#E535AB"
|
|
90
|
+
width="185"
|
|
91
|
+
height="16.6"
|
|
92
|
+
id="rect1048" />
|
|
93
|
+
</g>
|
|
94
|
+
</g><g
|
|
95
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
96
|
+
id="g1058">
|
|
97
|
+
<g
|
|
98
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
99
|
+
id="g1056">
|
|
100
|
+
|
|
101
|
+
<rect
|
|
102
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
103
|
+
x="177.1"
|
|
104
|
+
y="71.1"
|
|
105
|
+
transform="matrix(-0.866 -0.5 0.5 -0.866 463.3409 283.0693)"
|
|
106
|
+
fill="#E535AB"
|
|
107
|
+
width="185"
|
|
108
|
+
height="16.6"
|
|
109
|
+
id="rect1054" />
|
|
110
|
+
</g>
|
|
111
|
+
</g><g
|
|
112
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
113
|
+
id="g1064">
|
|
114
|
+
<g
|
|
115
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
116
|
+
id="g1062">
|
|
117
|
+
|
|
118
|
+
<rect
|
|
119
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
120
|
+
x="122.1"
|
|
121
|
+
y="-13"
|
|
122
|
+
transform="matrix(-0.5 -0.866 0.866 -0.5 126.7903 232.1221)"
|
|
123
|
+
fill="#E535AB"
|
|
124
|
+
width="16.6"
|
|
125
|
+
height="185"
|
|
126
|
+
id="rect1060" />
|
|
127
|
+
</g>
|
|
128
|
+
</g><g
|
|
129
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
130
|
+
id="g1076">
|
|
131
|
+
<g
|
|
132
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
133
|
+
id="g1074">
|
|
134
|
+
<rect
|
|
135
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
136
|
+
x="52.5"
|
|
137
|
+
y="107.5"
|
|
138
|
+
fill="#E535AB"
|
|
139
|
+
width="16.6"
|
|
140
|
+
height="185"
|
|
141
|
+
id="rect1072" />
|
|
142
|
+
</g>
|
|
143
|
+
</g><g
|
|
144
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
145
|
+
id="g1082">
|
|
146
|
+
<g
|
|
147
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
148
|
+
id="g1080">
|
|
149
|
+
<rect
|
|
150
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
151
|
+
x="330.9"
|
|
152
|
+
y="107.5"
|
|
153
|
+
fill="#E535AB"
|
|
154
|
+
width="16.6"
|
|
155
|
+
height="185"
|
|
156
|
+
id="rect1078" />
|
|
157
|
+
</g>
|
|
158
|
+
</g><g
|
|
159
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
160
|
+
id="g1088">
|
|
161
|
+
<g
|
|
162
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
163
|
+
id="g1086">
|
|
164
|
+
|
|
165
|
+
<rect
|
|
166
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
167
|
+
x="262.4"
|
|
168
|
+
y="240.1"
|
|
169
|
+
transform="matrix(-0.5 -0.866 0.866 -0.5 126.7953 714.2875)"
|
|
170
|
+
fill="#E535AB"
|
|
171
|
+
width="14.5"
|
|
172
|
+
height="160.9"
|
|
173
|
+
id="rect1084" />
|
|
174
|
+
</g>
|
|
175
|
+
</g><path
|
|
176
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
177
|
+
fill="#E535AB"
|
|
178
|
+
d="M369.5,297.9c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C373.5,259.9,379.2,281.2,369.5,297.9"
|
|
179
|
+
id="path1090" /><path
|
|
180
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
181
|
+
fill="#E535AB"
|
|
182
|
+
d="M90.9,137c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C94.8,99,100.5,120.3,90.9,137"
|
|
183
|
+
id="path1092" /><path
|
|
184
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
185
|
+
fill="#E535AB"
|
|
186
|
+
d="M30.5,297.9c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C61.4,320.3,40.1,314.6,30.5,297.9"
|
|
187
|
+
id="path1094" /><path
|
|
188
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
189
|
+
fill="#E535AB"
|
|
190
|
+
d="M309.1,137c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C340.1,159.4,318.7,153.7,309.1,137"
|
|
191
|
+
id="path1096" /><path
|
|
192
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
193
|
+
fill="#E535AB"
|
|
194
|
+
d="M200,395.8c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,380.1,219.3,395.8,200,395.8"
|
|
195
|
+
id="path1098" /><path
|
|
196
|
+
style="stroke:#87deaa;fill:#87deaa"
|
|
197
|
+
fill="#E535AB"
|
|
198
|
+
d="M200,74c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,58.4,219.3,74,200,74"
|
|
199
|
+
id="path1100" /></g><path
|
|
200
|
+
inkscape:connector-curvature="0"
|
|
201
|
+
id="path1730"
|
|
202
|
+
d="m 194.94107,395.2422 c -13.95633,-1.99842 -26.08609,-13.45037 -28.90983,-27.29432 -0.76471,-3.7492 -0.76539,-10.30665 -0.001,-14.0052 0.32479,-1.5724 0.45524,-2.99149 0.28988,-3.15353 -0.36564,-0.35832 -79.912818,-46.29934 -80.167583,-46.29934 -0.09914,0 -1.11264,0.79854 -2.252228,1.77454 -4.332239,3.71034 -9.402945,6.43791 -14.571982,7.83839 -4.381128,1.18701 -12.734297,1.19034 -17.095588,0.007 -12.172819,-3.30332 -21.259341,-12.15806 -24.856068,-24.22203 -1.363662,-4.57392 -1.611858,-11.36973 -0.594715,-16.28377 2.47393,-11.95211 11.321974,-22.08664 22.637015,-25.92839 l 3.184205,-1.08113 -0.09331,-46.62357 -0.09331,-46.62357 -2.692031,-0.90652 C 25.431016,144.26008 18.013932,113.80787 35.822744,95.366147 42.403226,88.551798 51.078061,84.947463 60.871975,84.958364 c 8.670761,0.0097 16.674107,3.120621 23.252188,9.038335 l 1.928658,1.735044 39.983109,-23.064427 c 21.99071,-12.685434 40.1184,-23.183801 40.28375,-23.329706 0.16536,-0.145904 0.0321,-1.565489 -0.29615,-3.154632 -0.75987,-3.678772 -0.77327,-10.499693 -0.0275,-14.024977 2.92621,-13.833188 13.81483,-24.5349388 27.60562,-27.1318651 4.36584,-0.8221239 11.25934,-0.5734198 15.43213,0.5567614 11.53708,3.1247611 21.19458,12.7081837 24.46221,24.2745587 1.1387,4.030657 1.39611,11.619125 0.54032,15.929081 -0.36572,1.841922 -0.5056,3.379628 -0.32345,3.556 0.1765,0.170908 17.85768,10.43218 39.29151,22.802823 21.43382,12.370644 39.42477,22.75878 39.97988,23.084743 0.99235,0.582713 1.03558,0.567706 2.57353,-0.893283 4.65525,-4.422269 10.37421,-7.389173 17.00541,-8.822125 3.45538,-0.74668 9.92397,-0.726346 13.60294,0.04277 13.7836,2.881544 24.35614,13.424345 27.17345,27.097005 0.7522,3.65052 0.7522,10.16724 0,13.81776 -2.48511,12.06048 -11.32083,22.03184 -23.01083,25.96836 l -2.69203,0.90652 -0.0933,46.64348 -0.0933,46.64347 2.11537,0.65531 c 8.96471,2.77714 16.73516,9.49292 20.88002,18.04603 2.38764,4.92698 3.14797,7.99778 3.37551,13.63286 0.14911,3.69269 0.0489,5.52663 -0.43177,7.89864 -2.07402,10.2357 -8.51451,19.06809 -17.50962,24.01242 -8.68587,4.77436 -19.19231,5.53884 -28.65581,2.08508 -4.54637,-1.65922 -8.42518,-4.12493 -12.49149,-7.94074 l -1.65441,-1.55248 -39.88971,23.05527 c -36.20603,20.92619 -39.88505,23.13758 -39.83926,23.94682 0.0277,0.49034 0.33655,2.2978 0.68624,4.01655 0.92697,4.5561 0.61523,11.50752 -0.7172,15.99265 -4.94337,16.64007 -21.31527,27.20275 -38.37686,24.75974 z m 71.38213,-81.00437 39.84721,-23.0037 -0.66758,-2.80202 c -3.28351,-13.78186 2.40473,-28.63562 13.97488,-36.49276 2.64145,-1.79377 7.5309,-4.16408 9.86853,-4.78407 l 1.5625,-0.4144 v -46.81487 -46.81488 l -1.10964,-0.22192 c -2.22757,-0.44552 -6.83211,-2.62368 -9.93783,-4.70106 -7.40189,-4.95105 -12.60534,-12.74618 -14.52232,-21.75547 -0.70335,-3.30554 -0.68263,-10.22081 0.0411,-13.72477 0.31586,-1.52917 0.52266,-2.82758 0.45956,-2.88536 -0.38786,-0.35513 -80.55566,-46.509212 -80.78466,-46.509212 -0.15526,0 -0.59745,0.351041 -0.98265,0.780088 -1.34618,1.499423 -4.95773,4.059019 -7.96388,5.644203 -7.67675,4.048055 -16.74682,5.096437 -25.08943,2.900011 -3.64832,-0.960526 -10.02499,-4.256765 -12.82369,-6.62885 -1.39126,-1.179187 -2.73182,-2.293228 -2.97901,-2.475639 -0.30475,-0.224886 -13.33838,7.101658 -40.48513,22.757742 -22.01963,12.699169 -40.170409,23.207397 -40.335063,23.351607 -0.164651,0.14422 -0.04057,1.62648 0.275735,3.2939 2.184592,11.51623 -1.392037,23.02701 -9.712875,31.25929 -4.302015,4.25623 -9.484959,7.23467 -15.723051,9.03544 -0.364533,0.10523 -0.459559,9.77563 -0.459559,46.76823 v 46.63558 l 2.11397,0.66172 c 5.538625,1.73372 10.22203,4.57735 14.369283,8.7246 4.645883,4.64588 7.44471,9.57596 9.146515,16.11139 1.153706,4.43057 1.28678,11.20543 0.302081,15.37939 -0.349209,1.48025 -0.577654,2.74233 -0.507651,2.80463 0.07,0.0623 18.211245,10.55222 40.313875,23.31094 l 40.1866,23.19769 3.19575,-2.59548 c 3.68657,-2.9941 9.10696,-5.80568 13.48987,-6.99726 4.34876,-1.18229 12.70682,-1.18161 17.09559,0.001 5.91406,1.59415 11.74962,4.86994 15.43291,8.66325 0.90538,0.93243 1.85195,1.61635 2.10348,1.51983 0.25152,-0.0965 18.38857,-10.52716 40.30454,-23.17919 z"
|
|
203
|
+
style="display:inline;fill:#87deaa;fill-opacity:1;stroke:#87deaa;stroke-width:0.368226;stop-color:#000000" /></g>
|
|
204
|
+
</svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: schema
|
|
3
|
+
slug: /
|
|
4
|
+
title: My API
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
hide_table_of_contents: true
|
|
7
|
+
pagination_next: null
|
|
8
|
+
pagination_prev: null
|
|
9
|
+
sidebar_class_name: navbar__toggle
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
This documentation has been automatically generated by [GraphQL-Markdown](https://graphql-markdown.dev) from the bundled example schema (`schema/example.graphql`) and the following configuration:
|
|
13
|
+
|
|
14
|
+
```yaml title=".graphqlrc"
|
|
15
|
+
schema: './schema/example.graphql'
|
|
16
|
+
extensions:
|
|
17
|
+
graphql-markdown:
|
|
18
|
+
baseURL: '.'
|
|
19
|
+
homepage: 'static/index.md'
|
|
20
|
+
loaders:
|
|
21
|
+
GraphQLFileLoader: '@graphql-tools/graphql-file-loader'
|
|
22
|
+
docOptions:
|
|
23
|
+
frontMatter:
|
|
24
|
+
pagination_next: null
|
|
25
|
+
pagination_prev: null
|
|
26
|
+
printTypeOptions:
|
|
27
|
+
deprecated: 'group'
|
|
28
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# GraphQL API Documentation
|
|
2
|
+
|
|
3
|
+
This is a GraphQL API reference site built with [GraphQL Markdown](https://graphql-markdown.dev) and [Nuxt](https://nuxt.com).
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
1. **Install dependencies:**
|
|
8
|
+
```bash
|
|
9
|
+
npm install
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. **Generate documentation from your GraphQL schema:**
|
|
13
|
+
```bash
|
|
14
|
+
npm run generate
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
3. **Start the development server:**
|
|
18
|
+
```bash
|
|
19
|
+
npm run dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The site will be available at `http://localhost:3000`.
|
|
23
|
+
|
|
24
|
+
## Customization
|
|
25
|
+
|
|
26
|
+
### Site Title and Branding
|
|
27
|
+
|
|
28
|
+
Edit `app/app.config.ts` to customize the site title and appearance:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
export default defineAppConfig({
|
|
32
|
+
gqlmd: {
|
|
33
|
+
siteTitle: 'My API',
|
|
34
|
+
githubUrl: 'https://github.com/example/repo',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Your GraphQL Schema
|
|
40
|
+
|
|
41
|
+
Replace the example schema in `schema/example.graphql` with your own GraphQL schema file. The path is configured in `generate-docs.ts`:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
export const generate = createGenerateDocs({
|
|
45
|
+
schema: './schema/your-schema.graphql',
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Advanced Configuration
|
|
50
|
+
|
|
51
|
+
For more advanced customization options, see the [@graphql-markdown/nuxt-theme documentation](https://graphql-markdown.dev).
|
|
52
|
+
|
|
53
|
+
## Building for Production
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run build
|
|
57
|
+
npm run preview
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Learn More
|
|
61
|
+
|
|
62
|
+
- [GraphQL Markdown Documentation](https://graphql-markdown.dev)
|
|
63
|
+
- [Nuxt Documentation](https://nuxt.com)
|
|
64
|
+
- [GraphQL Documentation](https://graphql.org)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example app configuration for the GraphQL Markdown theme.
|
|
3
|
+
*
|
|
4
|
+
* Customize the theme by overriding these values.
|
|
5
|
+
* All values are optional and will fall back to the layer's defaults.
|
|
6
|
+
*/
|
|
7
|
+
export default defineAppConfig({
|
|
8
|
+
gqlmd: {
|
|
9
|
+
siteTitle: 'My API',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// content.config.ts
|
|
2
|
+
import { defineContentConfig, defineCollection } from '@nuxt/content'
|
|
3
|
+
|
|
4
|
+
export default defineContentConfig({
|
|
5
|
+
collections: {
|
|
6
|
+
// Registers the generated Markdown pages; the formatter emits `.md` so that
|
|
7
|
+
// Nuxt Content's search indexer picks them up.
|
|
8
|
+
content: defineCollection({
|
|
9
|
+
type: 'page',
|
|
10
|
+
source: 'api-reference/**/*.md'
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
})
|