Skip to main content

Generate graphql schema.

Project description

Upload Python Package

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-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-hook
        stages: [commit]
        args: [
          '--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-1.0.0.tar.gz (2.4 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page