Commit c2be6b3
committed
Adjust config inheritance to reflect usage and type-hint better (#10560)
* Refactor utility function to match practice
* Fix config option inheritance
- addTypename/skipTypename: is only a types-visitor concern. This is moved to types-visitor from base-visitor
- nonOptionalTypename: is a documents-visitor and types-visitor concern. Moved from base-visitor there
- extractAllFieldsToTypes: is a documents-visitor concern. Moved from base-visitor there
- enumPrefix and enumSuffix: need to be in base-visitor as all 3 types of visitors need this to correctly sync the enum type names. This is moved to base visitor
- ignoreEnumValuesFromSchema: is a documents-visitor and types-visitor concern. Moved from base-visitor there.
- globalNamespace: is a documents-visitor concern. Moved from base-visitor there
Other changes:
- documents-visitor no longer extends types-visitor _option types_ as they have two distinct usages now. The types now extend base-visitor types. This is now consistent with documents-visitor extending base-visitor
- Classes now handle config parsing and types at the same level e.g. if typescript-operations plugin parses configOne, then the types for configOne must be in that class, rather than in base-documents-visitor
* Remove references and tests related to skipTypename in operations plugin
* Add changeset1 parent fdaf5d6 commit c2be6b3
File tree
11 files changed
+233
-436
lines changed- .changeset
- packages/plugins
- other/visitor-plugin-common/src
- selection-set-processor
- typescript/operations
- src
- tests
11 files changed
+233
-436
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 51 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 17 | + | |
31 | 18 | | |
32 | | - | |
33 | 19 | | |
34 | 20 | | |
35 | 21 | | |
36 | 22 | | |
37 | 23 | | |
38 | 24 | | |
| 25 | + | |
| 26 | + | |
39 | 27 | | |
40 | 28 | | |
41 | 29 | | |
42 | 30 | | |
43 | 31 | | |
44 | 32 | | |
45 | 33 | | |
46 | | - | |
| 34 | + | |
47 | 35 | | |
48 | 36 | | |
49 | 37 | | |
| |||
67 | 55 | | |
68 | 56 | | |
69 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
| |||
199 | 211 | | |
200 | 212 | | |
201 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
| |||
218 | 238 | | |
219 | 239 | | |
220 | 240 | | |
221 | | - | |
222 | | - | |
223 | 241 | | |
224 | 242 | | |
225 | 243 | | |
| 244 | + | |
226 | 245 | | |
227 | 246 | | |
228 | 247 | | |
| |||
231 | 250 | | |
232 | 251 | | |
233 | 252 | | |
| 253 | + | |
234 | 254 | | |
235 | 255 | | |
236 | 256 | | |
| |||
380 | 400 | | |
381 | 401 | | |
382 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
Lines changed: 0 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | 510 | | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | 511 | | |
566 | 512 | | |
567 | 513 | | |
| |||
795 | 741 | | |
796 | 742 | | |
797 | 743 | | |
798 | | - | |
799 | | - | |
800 | 744 | | |
801 | 745 | | |
802 | 746 | | |
| |||
0 commit comments