A Sphinx extension for automatically documenting GraphQL schemas.
Project description
A Sphinx extension for automatically documenting GraphQL schemas.
Getting Started
The following steps will walk through how to add autogqlschema to an existing Sphinx project. For instructions on how to set up a Sphinx project, see Sphinx’s documentation on Getting Started.
Installation
autogqlschema can be installed through pip:
pip install autogqlschema
Next, add autogqlschema to the extensions list in your Sphinx project’s conf.py.
extensions.append("autogqlschema")
Usage
Schema documentation is generated from GraphQL schema files using the autogqlschema directive.
In the following example, documentation is generated from ths file structure.
myrepo
├── doc
│ ├── conf.py
│ └── index.rst
└── src
└── mypackage
├── schema
│ ├── __init__.py
│ ├── 01_schema.graphql
│ └── 02_books.graphql
└── __init__.py
This schema can be generated with the following reStructuredText:
.. autogqlschema::
:root-dir: ../src/mypackage/schema
:source-files: *.graphql
Or:
.. autogqlschema::
:root-dir: ../src/mypackage/schema
:source-files: 01_schema.graphql, 02_books.graphql
For more detailed usage, see the documentation: https://autogqlschema.readthedocs.io/en/latest/
Contributing
Running the tests
Tests are executed through tox.
tox
Code Style
Code is formatted using black.
You can check your formatting using black’s check mode:
tox -e format
You can also get black to format your changes for you:
tox -e format -- src/ tests/
Release Notes
Release notes are managed through towncrier. When making a pull request you will need to create a news fragment to document your change:
tox -e release_notes -- create --help
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License. See the LICENSE.rst file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autogqlschema-1.0.0.tar.gz.
File metadata
- Download URL: autogqlschema-1.0.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d51fdf2a1ae9c165aa4fed72ce409f13ded8c899c88acf979259d0fc5ed5144
|
|
| MD5 |
9e73a55bd1e4a2676900ad812594ebd0
|
|
| BLAKE2b-256 |
2544a087f3f219a290114d01f8b90a372fa847a50f312475553bb1dae66dfc13
|
Provenance
The following attestation bundles were made for autogqlschema-1.0.0.tar.gz:
Publisher:
release.yml on AWhetter/autogqlschema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogqlschema-1.0.0.tar.gz -
Subject digest:
8d51fdf2a1ae9c165aa4fed72ce409f13ded8c899c88acf979259d0fc5ed5144 - Sigstore transparency entry: 172036563
- Sigstore integration time:
-
Permalink:
AWhetter/autogqlschema@3382458608d921234812d50abcd07588a96baf48 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AWhetter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3382458608d921234812d50abcd07588a96baf48 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autogqlschema-1.0.0-py3-none-any.whl.
File metadata
- Download URL: autogqlschema-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ba38a44470c7fa05f51de741d5bd2dcf94d28ac2f67968902e995239059493e
|
|
| MD5 |
1a01235136ea9e01f6a74d338b9b46a5
|
|
| BLAKE2b-256 |
ff6626d86577972f1884fd0a4d67033fec46ff54aff17ecf813e0a5d1c9413a3
|
Provenance
The following attestation bundles were made for autogqlschema-1.0.0-py3-none-any.whl:
Publisher:
release.yml on AWhetter/autogqlschema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogqlschema-1.0.0-py3-none-any.whl -
Subject digest:
7ba38a44470c7fa05f51de741d5bd2dcf94d28ac2f67968902e995239059493e - Sigstore transparency entry: 172036566
- Sigstore integration time:
-
Permalink:
AWhetter/autogqlschema@3382458608d921234812d50abcd07588a96baf48 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AWhetter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3382458608d921234812d50abcd07588a96baf48 -
Trigger Event:
push
-
Statement type: