Giter Club home page Giter Club logo

autogqlschema's Introduction

autogqlschema

Documentation Github Build Status PyPI Version Supported Python Versions Formatted with Black

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.