Commit 10331b0
RFC: OneOf Input Objects (#825)
* Renumber list items
* @OneOf input objects
* @OneOf fields
* Fix typos (thanks @eapache!)
* Much stricter validation for oneof literals (with examples)
* Add missing coercion rule
* Clearer wording of oneof coercion rule
* Add more examples for clarity
* Rename introspection fields to oneOf
* Oneof's now require exactly one field/argument, and non-nullable variables.
* Remove extraneous newline
* graphgl -> graphql
* Apply suggestions from @eapache's review
* Apply suggestions from code review
Co-authored-by: Michael Staib <michael@chillicream.com>
* Update spec/Section 3 -- Type System.md
* Remove Oneof Fields from spec
* Oneof -> OneOf
* Spellings
* Remove out of date example
* Rename __Type.oneOf to __Type.isOneOf
* Add a:null example
* Rewrite to avoid ambiguity of language
* Forbid 'extend input' from introducing the @OneOf directive
* Add yet more examples to the example coercion table
* Indicate `@oneOf` is a built-in directive
Co-authored-by: Shane Krueger <shane@acdmail.com>
* Update spec/Section 3 -- Type System.md
* remove OneOf-specific rule in favor of update to VariablesInAllowedPositions
for simplicity, this PR retains the same problems for variables with defaults that are fixed by strict All Variable Usages Are Allowed
* Clarify IsNonNullPosition algorithm
* Clarify OneOf examples
* Add more examples
* Null literal is separate
* Use 'execution error' and 'raise' rather than throw an error
* Update spec/Section 3 -- Type System.md
* Whitespace
Co-authored-by: Glen <glen.84@gmail.com>
* Clarify algorithm
* Rename 'Tagged'
* editorial: define and link _OneOf Input Object_
* execution error -> request error (input coercion)
* Simplify and clarify OneOf Input Object additional coercion rules
* Clarity and correctness
* Simplify
* Use a colon
* Use the correct error for the situation
* Remove example which will not always fail until #1059 is adopted
* copy tweaks and remove redundant examples
* dedicated subsection
* rogue plural + links
* sp
* sp
---------
Co-authored-by: Michael Staib <michael@chillicream.com>
Co-authored-by: Shane Krueger <shane@acdmail.com>
Co-authored-by: Yaacov Rydzinski <yaacovCR@gmail.com>
Co-authored-by: Glen <glen.84@gmail.com>
Co-authored-by: Lee Byron <lee@leebyron.com>1 parent cd0b8bd commit 10331b0
File tree
4 files changed
+183
-3
lines changed- spec
4 files changed
+183
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | | - | |
| 1571 | + | |
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| |||
1723 | 1723 | | |
1724 | 1724 | | |
1725 | 1725 | | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
1726 | 1729 | | |
1727 | 1730 | | |
1728 | 1731 | | |
| |||
1765 | 1768 | | |
1766 | 1769 | | |
1767 | 1770 | | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
1768 | 1837 | | |
1769 | 1838 | | |
1770 | 1839 | | |
| |||
1788 | 1857 | | |
1789 | 1858 | | |
1790 | 1859 | | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
1791 | 1866 | | |
1792 | 1867 | | |
1793 | 1868 | | |
| |||
2013 | 2088 | | |
2014 | 2089 | | |
2015 | 2090 | | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2016 | 2094 | | |
2017 | 2095 | | |
2018 | 2096 | | |
| |||
2227 | 2305 | | |
2228 | 2306 | | |
2229 | 2307 | | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
95 | 117 | | |
96 | 118 | | |
97 | 119 | | |
| |||
1462 | 1484 | | |
1463 | 1485 | | |
1464 | 1486 | | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1465 | 1493 | | |
1466 | 1494 | | |
1467 | 1495 | | |
| |||
1477 | 1505 | | |
1478 | 1506 | | |
1479 | 1507 | | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1480 | 1526 | | |
1481 | 1527 | | |
1482 | 1528 | | |
| |||
2003 | 2049 | | |
2004 | 2050 | | |
2005 | 2051 | | |
2006 | | - | |
2007 | | - | |
| 2052 | + | |
| 2053 | + | |
2008 | 2054 | | |
2009 | 2055 | | |
2010 | 2056 | | |
| |||
2015 | 2061 | | |
2016 | 2062 | | |
2017 | 2063 | | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
2018 | 2073 | | |
2019 | 2074 | | |
2020 | 2075 | | |
| |||
2103 | 2158 | | |
2104 | 2159 | | |
2105 | 2160 | | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2106 | 2185 | | |
2107 | 2186 | | |
2108 | 2187 | | |
| |||
0 commit comments