README
GraphQL schema HTML documentation generation, using graphdoc with Isolated Operations
Quick Start
1 . Add dependencies:
package.json
:
"devDependencies": {
"@2fd/graphdoc": "2.4.0",
"graphdoc-plugin-operations": "2.2.0",
"graphdoc-plugin-flexible": "1.0.2",
2 . If default options are not suitable, then configure graphdoc-plugin-operations
:
package.json
:
{
"graphdoc-plugin-operations": {
"documentTitle": "The Description",
"navigationTitle": "The Operations",
"eraseByNameRegex": "^someOperation\\w*",
"eraseByDescriptionRegex": "@RemoveFromDocumentation",
"extractParametersDoc": false,
"enableAssets": false
}
}
3 Use graphdoc-plugin-operations
:
package.json
:
"scripts": {
"doc": "graphdoc -p graphdoc/../../graphdoc-plugin-operations -p graphdoc/../../graphdoc-plugin-flexible -p graphdoc/../../graphdoc-plugin-schema -s ./schema.graphql -o ./build/documentation"
},
"graphdoc-plugin-flexible": {
"document.schema": { "disable": true }
},
"graphdoc-plugin-schema": {
"enableAssets": false
},
"devDependencies": {
"@2fd/graphdoc": "2.4.0",
"graphdoc-plugin-flexible": "1.0.2",
"graphdoc-plugin-operations": "2.2.0",
"graphdoc-plugin-schema": "2.0.0",
graphdoc-plugin-flexible
is required to disabledocument.schema
plugin and allow custom types.
graphdoc-plugin-schema
will substitute disableddocument.schema
plugin when required, and"enableAssets": false
to avoid assets duplication.
graphdoc/../../
this is required to get external plugins working ingraphdoc
.
Goals
graphdoc-plugin-operations
provides a way document operations independently using graphdoc
.
Options
package.json
:
(default values)
{
"graphdoc-plugin-operations": {
"documentTitle": "Description",
"navigationTitle": "Operations",
"eraseByNameRegex": "^