1.0.10 • Published 4 years ago
gql-template-doc v1.0.10
GQL-Template-Doc
Templating and generating GraphQL schema from endpoint.
(Introspection should be enabled.)
Why you should disable graphql inspection in production
General
Apollo
Installation
Using npm :
# install local
$ npm i gql-template-doc
# install global
$ npm i -g gql-template-docUsage
gql-template-doc -e=<endpoint> [--options]| required | alias | options | defaultValue | description |
|---|---|---|---|---|
| O | -e | --endpoint | GraphQL Endpoint for generate document. | |
| -o | --output | "./src" | Output file directory. | |
| --pb, --partialBaseDir | "./partials" | Partials directory. | ||
| --tb, --templateBaseDir | "./templates" | Templates directory. | ||
| -t, --type | "Type.html" | Type template file name. |
How does it works?
- Register partials in
--partialBaseDir. - Get schema from
--endpointand parse it withgqlinspector-core. - Render templates in
--templateBaseDirexcept type template file.(file name :--type) - Render each types in parsed result using type template file.(file name:
--type)