Commit 0e22cc4
authored
improve upgrade path for new custom scalar
`parseLiteral()` has been marked as deprecated, prompting but not
forcing our users to convert to `parseConstLiteral()`.
With this additional change:
- in v17, if not supplied, the new `parseConstLiteral()` method will be
left as undefined, and during execution, we will fall back
to`parseLiteral()`.
- in v18, we will remove `parseLiteral()` and set up a default function
for `parseConstLiteral()` when not supplied.
Prior to this change, users of custom scalars with custom
`parseLiteral()` functions who did not provide a custom
`parseConstLiteral()` function would just get the default
`parseConstLiteral()` function during execution, which might not work as
expected.
This scheme will work except for users of custom scalars who want to
embed experimental fragment variables in their custom scalars, which
will only work with the new `parseConstLiteral()` method.parseConstLiteral() method (#4209)1 parent 4dfae39 commit 0e22cc4
File tree
5 files changed
+21
-19
lines changed- src
- type
- __tests__
- utilities
- validation/rules
5 files changed
+21
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
| |||
447 | 450 | | |
448 | 451 | | |
449 | 452 | | |
| 453 | + | |
450 | 454 | | |
451 | 455 | | |
452 | 456 | | |
| |||
559 | 563 | | |
560 | 564 | | |
561 | 565 | | |
| 566 | + | |
562 | 567 | | |
563 | 568 | | |
564 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
| 611 | + | |
614 | 612 | | |
615 | 613 | | |
616 | 614 | | |
| |||
708 | 706 | | |
709 | 707 | | |
710 | 708 | | |
711 | | - | |
| 709 | + | |
712 | 710 | | |
713 | 711 | | |
714 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | 374 | | |
381 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
161 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
0 commit comments