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

Commit c1250c6

Browse files
fix dict access pattern
1 parent dcefcab commit c1250c6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

graphql_api/views.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
189189
class AsyncGraphqlView(GraphQLAsyncView):
190190
schema = schema
191191
extensions = [QueryMetricsExtension]
192-
introspection = getattr(settings, "GRAPHQL_INTROSPECTION_ENABLED", False)
192+
introspection = settings.GRAPHQL_INTROSPECTION_ENABLED
193193

194194
def get_validation_rules(
195195
self,
@@ -203,10 +203,8 @@ def get_validation_rules(
203203
default_cost=1,
204204
variables=data.get("variables"),
205205
),
206-
create_max_depth_rule(max_depth=getattr(settings, "GRAPHQL_MAX_DEPTH", 15)),
207-
create_max_aliases_rule(
208-
max_aliases=getattr(settings, "GRAPHQL_MAX_ALIASES", 15)
209-
),
206+
create_max_depth_rule(max_depth=settings.GRAPHQL_MAX_DEPTH),
207+
create_max_aliases_rule(max_aliases=settings.GRAPHQL_MAX_ALIASES),
210208
]
211209

212210
validation_rules = get_validation_rules # type: ignore

0 commit comments

Comments
 (0)