mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-16 11:12:20 +03:00
.
This commit is contained in:
parent
608af578d4
commit
9e6fbb1167
|
@ -1,4 +1,4 @@
|
||||||
from graphene import List, ObjectType
|
from graphene import List, ObjectType, Int
|
||||||
|
|
||||||
from .sql.types import DjangoDebugSQL
|
from .sql.types import DjangoDebugSQL
|
||||||
from .exception.types import DjangoDebugException
|
from .exception.types import DjangoDebugException
|
||||||
|
@ -9,6 +9,10 @@ class DjangoDebug(ObjectType):
|
||||||
description = "Debugging information for the current query."
|
description = "Debugging information for the current query."
|
||||||
|
|
||||||
sql = List(DjangoDebugSQL, description="Executed SQL queries for this API query.")
|
sql = List(DjangoDebugSQL, description="Executed SQL queries for this API query.")
|
||||||
|
sql_count = Int(description="Number of executed SQL queries for this API query.")
|
||||||
exceptions = List(
|
exceptions = List(
|
||||||
DjangoDebugException, description="Raise exceptions for this API query."
|
DjangoDebugException, description="Raise exceptions for this API query."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def resolve_sql_count(root, info):
|
||||||
|
return 3
|
||||||
|
|
Loading…
Reference in New Issue
Block a user