File tree Expand file tree Collapse file tree 2 files changed +55
-15
lines changed Expand file tree Collapse file tree 2 files changed +55
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
4
4
class DjangoDebugSQL (ObjectType ):
5
- vendor = String ()
6
- alias = String ()
7
- sql = String ()
8
- duration = Float ()
9
- raw_sql = String ()
10
- params = String ()
11
- start_time = Float ()
12
- stop_time = Float ()
13
- is_slow = Boolean ()
14
- is_select = Boolean ()
5
+ class Meta :
6
+ description = (
7
+ "Represents a single database query made to a Django managed DB."
8
+ )
9
+
10
+ vendor = String (
11
+ required = True ,
12
+ description = (
13
+ "The type of database being used (e.g. postrgesql, mysql, sqlite)."
14
+ ),
15
+ )
16
+ alias = String (
17
+ required = True ,
18
+ description = "The Django database alias (e.g. 'default')." ,
19
+ )
20
+ sql = String (description = "The actual SQL sent to this database." )
21
+ duration = Float (
22
+ required = True ,
23
+ description = "Duration of this database query in seconds." ,
24
+ )
25
+ raw_sql = String (
26
+ required = True ,
27
+ description = "The raw SQL of this query, without params." ,
28
+ )
29
+ params = String (
30
+ required = True ,
31
+ description = "JSON encoded database query parameters." ,
32
+ )
33
+ start_time = Float (
34
+ required = True ,
35
+ description = "Start time of this database query." ,
36
+ )
37
+ stop_time = Float (
38
+ required = True ,
39
+ description = "Stop time of this database query." ,
40
+ )
41
+ is_slow = Boolean (
42
+ required = True ,
43
+ description = "Whether this database query took more than 10 seconds." ,
44
+ )
45
+ is_select = Boolean (
46
+ required = True ,
47
+ description = "Whether this database query was a SELECT." ,
48
+ )
15
49
16
50
# Postgres
17
- trans_id = String ()
18
- trans_status = String ()
19
- iso_level = String ()
20
- encoding = String ()
51
+ trans_id = String (description = "Postgres transaction ID if available." )
52
+ trans_status = String (description = "Postgres transaction status if available." )
53
+ iso_level = String (description = "Postgres isolation level if available." )
54
+ encoding = String (description = "Postgres connection encoding if available." )
Original file line number Diff line number Diff line change 4
4
5
5
6
6
class DjangoDebug (ObjectType ):
7
- sql = List (DjangoDebugSQL )
7
+ class Meta :
8
+ description = "Debugging information for the current query."
9
+
10
+ sql = List (
11
+ DjangoDebugSQL ,
12
+ description = "Executed SQL queries for this API query." ,
13
+ )
You can’t perform that action at this time.
0 commit comments