Skip to main content

Generate graphql schema.

Project description

graphene-django-precommit-hook

pre-commit hook to generate .graphql | .json graphql schema for graphene-django.

As a pre-commit hook

See pre-commit for instructions

Sample basic .pre-commit-config.yaml

-   repo: https://github.com/jackton1/graphene-django-precommit-hook
    rev: v0.1.0
    hooks:
      - id: graphene-django-precommit-hook
        stages: [commit]

Sample complex .pre-commit-config.yaml

-   repo: https://github.com/jackton1/graphene-django-precommit-hook
    rev: v0.1.0
    hooks:
      - id: graphene-django-precommit-hook
        stages: [commit]
        args: [
          '--python-version',
          '3.6', # Defaults to: 3.6
          '--managepy-path',
          '/path/to/manage.py', # Defaults to: manage.py
          '--settings',
          'project.settings'. # Defaults to: DJANGO_SETTINGS_MODULE
          '--indent',
          '4' # See https://docs.graphene-python.org/projects/django/en/latest/introspection/
          '--out',
          'path/to/schema.graphql',
          '--schema',
          'module.path.to.schema',
          '--verbosity', # OR '-v'
          '2', # Set the verbosity level {0,1,2,3}
        ]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphene_django_hook-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

graphene_django_hook-0.1.0-py2.py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page