Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit 54ba983

Browse files
authored
Update README.md
1 parent 552f119 commit 54ba983

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@ pre-commit hook to generate `.graphql` | `.json` graphql schema for [graphene-dj
66

77
See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions
88

9-
Sample `.pre-commit-config.yaml`
9+
10+
Sample basic `.pre-commit-config.yaml`
11+
12+
```yaml
13+
- repo: https://github.com/jackton1/graphene-django-precommit-hook
14+
rev: v0.1.0
15+
hooks:
16+
- id: graphene-django-precommit-hook
17+
stages: [commit]
18+
```
19+
20+
21+
Sample complex `.pre-commit-config.yaml`
1022

1123
```yaml
1224
- repo: https://github.com/jackton1/graphene-django-precommit-hook
@@ -20,6 +32,14 @@ Sample `.pre-commit-config.yaml`
2032
'--managepy-path',
2133
'/path/to/manage.py', # Defaults to: manage.py
2234
'--settings',
23-
'project.settings' # Defaults to: DJANGO_SETTINGS_MODULE
35+
'project.settings'. # Defaults to: DJANGO_SETTINGS_MODULE
36+
'--indent',
37+
'4' # See https://docs.graphene-python.org/projects/django/en/latest/introspection/
38+
'--out',
39+
'path/to/schema.graphql',
40+
'--schema',
41+
'module.path.to.schema',
42+
'--verbosity' # OR '-v'
43+
'2', # Set the verbosity level {0,1,2,3}
2444
]
2545
```

0 commit comments

Comments
 (0)