Commit d29971e
committed
Add test_graphql_comments management command for easy setup verification
This commit adds a Django management command that simplifies testing and
verification of GraphQL SQLCommenter setup, as requested for the quickstart
guide.
New Features:
- Management command: python manage.py test_graphql_comments
- Checks configuration (middleware, settings, paths)
- Sets test GraphQL metadata
- Executes test SQL query
- Analyzes queries for GraphQL comments
- Reports success/failure with troubleshooting tips
- Command options:
- --operation-name: Test with custom operation name
- --query-type: Test different types (query/mutation/subscription)
- --verbose: Show full SQL queries in output
Documentation Updates:
- Simplified quickstart guide to feature the management command
- Moved advanced testing methods to API Reference
- Added "Quick Test" section to Troubleshooting guide
- Updated Example README to include management command
Testing:
- 15 comprehensive tests with 100% coverage of management command
- All 96 tests pass across Python 3.9, 3.11, and 3.13
- Overall project coverage increased from 91% to 95%
The management command provides a simple, single-command way to verify
GraphQL SQL commenting is working correctly, improving the developer
experience during initial setup.1 parent cd2a517 commit d29971e
9 files changed
Lines changed: 584 additions & 55 deletions
File tree
- docs
- getting-started
- reference
- example
- graphql_sqlcommenter
- management
- commands
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 112 | + | |
138 | 113 | | |
| 114 | + | |
139 | 115 | | |
140 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
141 | 120 | | |
142 | | - | |
| 121 | + | |
| 122 | + | |
143 | 123 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 124 | + | |
| 125 | + | |
148 | 126 | | |
| 127 | + | |
| 128 | + | |
149 | 129 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 130 | + | |
157 | 131 | | |
158 | 132 | | |
159 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
160 | 138 | | |
161 | | - | |
| 139 | + | |
162 | 140 | | |
163 | 141 | | |
164 | 142 | | |
| |||
176 | 154 | | |
177 | 155 | | |
178 | 156 | | |
179 | | - | |
| 157 | + | |
180 | 158 | | |
181 | 159 | | |
182 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
131 | 189 | | |
132 | 190 | | |
133 | 191 | | |
| |||
345 | 403 | | |
346 | 404 | | |
347 | 405 | | |
348 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
349 | 456 | | |
350 | 457 | | |
351 | 458 | | |
| 459 | + | |
| 460 | + | |
352 | 461 | | |
353 | | - | |
354 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
355 | 465 | | |
356 | | - | |
357 | | - | |
358 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
359 | 469 | | |
360 | | - | |
361 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
362 | 496 | | |
363 | 497 | | |
364 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
5 | 28 | | |
6 | 29 | | |
7 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
Whitespace-only changes.
Whitespace-only changes.
0 commit comments