File tree Expand file tree Collapse file tree 2 files changed +104
-1
lines changed Expand file tree Collapse file tree 2 files changed +104
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,6 @@ For more advanced use, check out the Relay tutorial.
29
29
filtering
30
30
authorization
31
31
debug
32
- rest-framework
33
32
introspection
34
33
testing
34
+ settings
Original file line number Diff line number Diff line change
1
+ Settings
2
+ ========
3
+
4
+ Graphene-Django can be customised using settings. This page explains each setting and their defaults.
5
+
6
+ Usage
7
+ -----
8
+
9
+ Add settings to your Django project by creating a Dictonary with name ``GRAPHENE `` in the project's ``settings.py ``:
10
+
11
+ .. code :: python
12
+
13
+ GRAPHENE = {
14
+ ...
15
+ }
16
+
17
+
18
+ ``SCHEMA ``
19
+ ----------
20
+
21
+ The location of the top-level ``Schema `` class.
22
+
23
+ Default: ``None ``
24
+
25
+ .. code :: python
26
+
27
+ GRAPHENE = {
28
+ ' SCHEMA' : ' path.to.schema.schema' ,
29
+ }
30
+
31
+
32
+ ``SCHEMA_OUTPUT ``
33
+ ----------
34
+
35
+ The name of the file where the GraphQL schema output will go.
36
+
37
+ Default: ``schema.json ``
38
+
39
+ .. code :: python
40
+
41
+ GRAPHENE = {
42
+ ' SCHEMA_OUTPUT' : ' schema.json' ,
43
+ }
44
+
45
+
46
+ ``SCHEMA_INDENT ``
47
+ ----------
48
+
49
+ The indentation level of the schema output.
50
+
51
+ Default: ``2 ``
52
+
53
+ .. code :: python
54
+
55
+ GRAPHENE = {
56
+ ' SCHEMA_INDENT' : 2 ,
57
+ }
58
+
59
+
60
+ ``MIDDLEWARE ``
61
+ ----------
62
+
63
+ A tuple of middleware that will be executed for each GraphQL query.
64
+
65
+ See the `middleware documentation <https://docs.graphene-python.org/en/latest/execution/middleware/ >`__ for more information.
66
+
67
+ Default: ``() ``
68
+
69
+ .. code :: python
70
+
71
+ GRAPHENE = {
72
+ ' MIDDLEWARE' : (
73
+ ' path.to.my.middleware.class' ,
74
+ ),
75
+ }
76
+
77
+
78
+ ``RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST ``
79
+ ----------
80
+
81
+ Enforces relay queries to have the ``first `` or ``last `` argument.
82
+
83
+ Default: ``False ``
84
+
85
+ .. code :: python
86
+
87
+ GRAPHENE = {
88
+ ' RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST' : False ,
89
+ }
90
+
91
+
92
+ ``RELAY_CONNECTION_MAX_LIMIT ``
93
+ ----------
94
+
95
+ The maximum size of objects that can be requested through a relay connection.
96
+
97
+ Default: ``100 ``
98
+
99
+ .. code :: python
100
+
101
+ GRAPHENE = {
102
+ ' RELAY_CONNECTION_MAX_LIMIT' : 100 ,
103
+ }
You can’t perform that action at this time.
0 commit comments