graphqldomain


Namegraphqldomain JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryA GraphQL domain for Sphinx.
upload_time2023-08-31 02:58:58
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            graphqldomain
==============

.. image:: https://readthedocs.org/projects/graphqldomain/badge/?version=latest
    :target: https://graphqldomain.readthedocs.org
    :alt: Documentation

.. image:: https://github.com/AWhetter/graphqldomain/actions/workflows/main.yml/badge.svg?branch=main
    :target: https://github.com/AWhetter/graphqldomain/actions/workflows/main.yml?query=branch%3Amain
    :alt: Github Build Status

.. image:: https://img.shields.io/pypi/v/graphqldomain.svg
    :target: https://pypi.org/project/graphqldomain/
    :alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/graphqldomain.svg
    :target: https://pypi.org/project/graphqldomain/
    :alt: Supported Python Versions

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/python/black
    :alt: Formatted with Black

A Sphinx domain for describing GraphQL schemas.


Getting Started
---------------

The following steps will walk through how to add ``graphqldomain`` to an existing Sphinx project.
For instructions on how to set up a Sphinx project,
see Sphinx's documentation on
`Getting Started <https://www.sphinx-doc.org/en/master/usage/quickstart.html>`_.


Installation
~~~~~~~~~~~~

``graphqldomain`` can be installed through pip:

.. code-block:: bash

    pip install graphqldomain

Next, add ``graphqldomain`` to the ``extensions`` list in your Sphinx project's `conf.py`.

.. code-block:: python

    extensions.append("graphqldomain")


Usage
-----

Each directive accepts a small snippet of the original schema.
For more detailed usage, see the documentation:
https://graphqldomain.readthedocs.io/en/latest/

.. code-block:: rst

   .. gql:schema::

      An example schema.

      :optype Query query:

      .. gql:directive:: @slow(super: Boolean = false) on FIELD_DEFINITION | ARGUMENT_DEFINITION

         Indicates that the usage of this field or argument is slow,
         and therefore queries with this field or argument should be made sparingly.

         :argument super: Whether usage will be super slow, or just a bit slow.

      .. gql:enum:: CharacterCase

         The casing of a character.

         .. gql:enum:value:: UPPER

            Upper case.

         .. gql:enum:value:: LOWER

            Lower case.

      .. gql:input:: Point2D

         A point in a 2D coordinate system.

         .. gql:input:field:: x: Float

            The ``x`` coordinate of the point.

         .. gql:input:field:: y: Float

            The ``y`` coordinate of the point.

      .. gql:interface:: NamedEntity

         An entity with a name.

         .. gql:interface:field:: name(lower: Boolean = false): String

            The name of the entity.

            :argument lower: Whether to lowercase the name or not.

      .. gql:type:: Person implements NamedEntity

         A human person.

         .. gql:type:field:: age: Int

            How old the person is in years.

         .. gql:type:field:: picture: Url

      .. gql:union:: Centre = Person | Point2D

         A possible centre of the universe.


Contributing
------------


Running the tests
~~~~~~~~~~~~~~~~~

Tests are executed through `tox <https://tox.readthedocs.io/en/latest/>`_.

.. code-block:: bash

    tox


Code Style
~~~~~~~~~~

Code is formatted using `black <https://github.com/python/black>`_.

You can check your formatting using black's check mode:

.. code-block:: bash

    tox -e format

You can also get black to format your changes for you:

.. code-block:: bash

    black graphqldomain.py tests/


Versioning
----------

We use `SemVer <https://semver.org/>`_ for versioning. For the versions available, see the `tags on this repository <https://github.com/AWhetter/graphqldomain/tags>`_.


License
-------

This project is licensed under the MIT License.
See the `LICENSE.rst <LICENSE.rst>`_ file for details.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "graphqldomain",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Ashley Whetter <ashley@awhetter.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/71/f1/f09d438ba09d8e4bf561f02d42549751cc5db616468f74e669b3c89bd286/graphqldomain-0.2.0.tar.gz",
    "platform": null,
    "description": "graphqldomain\n==============\n\n.. image:: https://readthedocs.org/projects/graphqldomain/badge/?version=latest\n    :target: https://graphqldomain.readthedocs.org\n    :alt: Documentation\n\n.. image:: https://github.com/AWhetter/graphqldomain/actions/workflows/main.yml/badge.svg?branch=main\n    :target: https://github.com/AWhetter/graphqldomain/actions/workflows/main.yml?query=branch%3Amain\n    :alt: Github Build Status\n\n.. image:: https://img.shields.io/pypi/v/graphqldomain.svg\n    :target: https://pypi.org/project/graphqldomain/\n    :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/graphqldomain.svg\n    :target: https://pypi.org/project/graphqldomain/\n    :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/python/black\n    :alt: Formatted with Black\n\nA Sphinx domain for describing GraphQL schemas.\n\n\nGetting Started\n---------------\n\nThe following steps will walk through how to add ``graphqldomain`` to an existing Sphinx project.\nFor instructions on how to set up a Sphinx project,\nsee Sphinx's documentation on\n`Getting Started <https://www.sphinx-doc.org/en/master/usage/quickstart.html>`_.\n\n\nInstallation\n~~~~~~~~~~~~\n\n``graphqldomain`` can be installed through pip:\n\n.. code-block:: bash\n\n    pip install graphqldomain\n\nNext, add ``graphqldomain`` to the ``extensions`` list in your Sphinx project's `conf.py`.\n\n.. code-block:: python\n\n    extensions.append(\"graphqldomain\")\n\n\nUsage\n-----\n\nEach directive accepts a small snippet of the original schema.\nFor more detailed usage, see the documentation:\nhttps://graphqldomain.readthedocs.io/en/latest/\n\n.. code-block:: rst\n\n   .. gql:schema::\n\n      An example schema.\n\n      :optype Query query:\n\n      .. gql:directive:: @slow(super: Boolean = false) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n\n         Indicates that the usage of this field or argument is slow,\n         and therefore queries with this field or argument should be made sparingly.\n\n         :argument super: Whether usage will be super slow, or just a bit slow.\n\n      .. gql:enum:: CharacterCase\n\n         The casing of a character.\n\n         .. gql:enum:value:: UPPER\n\n            Upper case.\n\n         .. gql:enum:value:: LOWER\n\n            Lower case.\n\n      .. gql:input:: Point2D\n\n         A point in a 2D coordinate system.\n\n         .. gql:input:field:: x: Float\n\n            The ``x`` coordinate of the point.\n\n         .. gql:input:field:: y: Float\n\n            The ``y`` coordinate of the point.\n\n      .. gql:interface:: NamedEntity\n\n         An entity with a name.\n\n         .. gql:interface:field:: name(lower: Boolean = false): String\n\n            The name of the entity.\n\n            :argument lower: Whether to lowercase the name or not.\n\n      .. gql:type:: Person implements NamedEntity\n\n         A human person.\n\n         .. gql:type:field:: age: Int\n\n            How old the person is in years.\n\n         .. gql:type:field:: picture: Url\n\n      .. gql:union:: Centre = Person | Point2D\n\n         A possible centre of the universe.\n\n\nContributing\n------------\n\n\nRunning the tests\n~~~~~~~~~~~~~~~~~\n\nTests are executed through `tox <https://tox.readthedocs.io/en/latest/>`_.\n\n.. code-block:: bash\n\n    tox\n\n\nCode Style\n~~~~~~~~~~\n\nCode is formatted using `black <https://github.com/python/black>`_.\n\nYou can check your formatting using black's check mode:\n\n.. code-block:: bash\n\n    tox -e format\n\nYou can also get black to format your changes for you:\n\n.. code-block:: bash\n\n    black graphqldomain.py tests/\n\n\nVersioning\n----------\n\nWe use `SemVer <https://semver.org/>`_ for versioning. For the versions available, see the `tags on this repository <https://github.com/AWhetter/graphqldomain/tags>`_.\n\n\nLicense\n-------\n\nThis project is licensed under the MIT License.\nSee the `LICENSE.rst <LICENSE.rst>`_ file for details.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A GraphQL domain for Sphinx.",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://graphqldomain.readthedocs.org",
        "Source": "https://github.com/AWhetter/graphqldomain"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0655d0165a60072c7886f9a296a10f31103fff795ce3d340b51e7b25712fcaca",
                "md5": "6c663d255fa8ebe7341ae55bf4d10431",
                "sha256": "e9c813a670cb6db9492b8b63e8fff54a0e0a522f49ea35d2bc9bf52acbaa641e"
            },
            "downloads": -1,
            "filename": "graphqldomain-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c663d255fa8ebe7341ae55bf4d10431",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9204,
            "upload_time": "2023-08-31T02:58:57",
            "upload_time_iso_8601": "2023-08-31T02:58:57.174913Z",
            "url": "https://files.pythonhosted.org/packages/06/55/d0165a60072c7886f9a296a10f31103fff795ce3d340b51e7b25712fcaca/graphqldomain-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71f1f09d438ba09d8e4bf561f02d42549751cc5db616468f74e669b3c89bd286",
                "md5": "4a3f2ca2640c2beb0e2f3bcf6db08b5c",
                "sha256": "59d5f9269e513d2c55be47ed86088ecd9cfbdd0a44df8c77c71821550d52385c"
            },
            "downloads": -1,
            "filename": "graphqldomain-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4a3f2ca2640c2beb0e2f3bcf6db08b5c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10416,
            "upload_time": "2023-08-31T02:58:58",
            "upload_time_iso_8601": "2023-08-31T02:58:58.923787Z",
            "url": "https://files.pythonhosted.org/packages/71/f1/f09d438ba09d8e4bf561f02d42549751cc5db616468f74e669b3c89bd286/graphqldomain-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-31 02:58:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AWhetter",
    "github_project": "graphqldomain",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "graphqldomain"
}
        
Elapsed time: 0.23623s