@@ -1739,6 +1739,19 @@ public final class SchemaDefinition {
1739
1739
self . directives = directives
1740
1740
self . operationTypes = operationTypes
1741
1741
}
1742
+
1743
+ public func get( key: String ) -> NodeResult ? {
1744
+ switch key {
1745
+ case " description " :
1746
+ return description. map { . node( $0) }
1747
+ case " directives " :
1748
+ return . array( directives)
1749
+ case " operationTypes " :
1750
+ return . array( operationTypes)
1751
+ default :
1752
+ return nil
1753
+ }
1754
+ }
1742
1755
}
1743
1756
1744
1757
extension SchemaDefinition : Equatable {
@@ -1760,6 +1773,15 @@ public final class OperationTypeDefinition {
1760
1773
self . operation = operation
1761
1774
self . type = type
1762
1775
}
1776
+
1777
+ public func get( key: String ) -> NodeResult ? {
1778
+ switch key {
1779
+ case " type " :
1780
+ return . node( type)
1781
+ default :
1782
+ return nil
1783
+ }
1784
+ }
1763
1785
}
1764
1786
1765
1787
extension OperationTypeDefinition : Equatable {
@@ -1831,6 +1853,19 @@ public final class ScalarTypeDefinition {
1831
1853
self . name = name
1832
1854
self . directives = directives
1833
1855
}
1856
+
1857
+ public func get( key: String ) -> NodeResult ? {
1858
+ switch key {
1859
+ case " description " :
1860
+ return description. map { . node( $0) }
1861
+ case " name " :
1862
+ return . node( name)
1863
+ case " directives " :
1864
+ return . array( directives)
1865
+ default :
1866
+ return nil
1867
+ }
1868
+ }
1834
1869
}
1835
1870
1836
1871
extension ScalarTypeDefinition : Equatable {
@@ -1865,6 +1900,23 @@ public final class ObjectTypeDefinition {
1865
1900
self . directives = directives
1866
1901
self . fields = fields
1867
1902
}
1903
+
1904
+ public func get( key: String ) -> NodeResult ? {
1905
+ switch key {
1906
+ case " description " :
1907
+ return description. map { . node( $0) }
1908
+ case " name " :
1909
+ return . node( name)
1910
+ case " interfaces " :
1911
+ return . array( interfaces)
1912
+ case " directives " :
1913
+ return . array( directives)
1914
+ case " fields " :
1915
+ return . array( fields)
1916
+ default :
1917
+ return nil
1918
+ }
1919
+ }
1868
1920
}
1869
1921
1870
1922
extension ObjectTypeDefinition : Equatable {
@@ -1901,6 +1953,23 @@ public final class FieldDefinition {
1901
1953
self . type = type
1902
1954
self . directives = directives
1903
1955
}
1956
+
1957
+ public func get( key: String ) -> NodeResult ? {
1958
+ switch key {
1959
+ case " description " :
1960
+ return description. map { . node( $0) }
1961
+ case " name " :
1962
+ return . node( name)
1963
+ case " arguments " :
1964
+ return . array( arguments)
1965
+ case " type " :
1966
+ return . node( type)
1967
+ case " directives " :
1968
+ return . array( directives)
1969
+ default :
1970
+ return nil
1971
+ }
1972
+ }
1904
1973
}
1905
1974
1906
1975
extension FieldDefinition : Equatable {
@@ -1937,6 +2006,23 @@ public final class InputValueDefinition {
1937
2006
self . defaultValue = defaultValue
1938
2007
self . directives = directives
1939
2008
}
2009
+
2010
+ public func get( key: String ) -> NodeResult ? {
2011
+ switch key {
2012
+ case " description " :
2013
+ return description. map { . node( $0) }
2014
+ case " name " :
2015
+ return . node( name)
2016
+ case " type " :
2017
+ return . node( type)
2018
+ case " defaultValue " :
2019
+ return defaultValue. map { . node( $0) }
2020
+ case " directives " :
2021
+ return . array( directives)
2022
+ default :
2023
+ return nil
2024
+ }
2025
+ }
1940
2026
}
1941
2027
1942
2028
extension InputValueDefinition : Equatable {
@@ -1989,6 +2075,23 @@ public final class InterfaceTypeDefinition {
1989
2075
self . directives = directives
1990
2076
self . fields = fields
1991
2077
}
2078
+
2079
+ public func get( key: String ) -> NodeResult ? {
2080
+ switch key {
2081
+ case " description " :
2082
+ return description. map { . node( $0) }
2083
+ case " name " :
2084
+ return . node( name)
2085
+ case " interfaces " :
2086
+ return . array( interfaces)
2087
+ case " directives " :
2088
+ return . array( directives)
2089
+ case " fields " :
2090
+ return . array( fields)
2091
+ default :
2092
+ return nil
2093
+ }
2094
+ }
1992
2095
}
1993
2096
1994
2097
extension InterfaceTypeDefinition : Equatable {
@@ -2021,6 +2124,21 @@ public final class UnionTypeDefinition {
2021
2124
self . directives = directives
2022
2125
self . types = types
2023
2126
}
2127
+
2128
+ public func get( key: String ) -> NodeResult ? {
2129
+ switch key {
2130
+ case " description " :
2131
+ return description. map { . node( $0) }
2132
+ case " name " :
2133
+ return . node( name)
2134
+ case " directives " :
2135
+ return . array( directives)
2136
+ case " types " :
2137
+ return . array( types)
2138
+ default :
2139
+ return nil
2140
+ }
2141
+ }
2024
2142
}
2025
2143
2026
2144
extension UnionTypeDefinition : Equatable {
@@ -2053,6 +2171,21 @@ public final class EnumTypeDefinition {
2053
2171
self . directives = directives
2054
2172
self . values = values
2055
2173
}
2174
+
2175
+ public func get( key: String ) -> NodeResult ? {
2176
+ switch key {
2177
+ case " description " :
2178
+ return description. map { . node( $0) }
2179
+ case " name " :
2180
+ return . node( name)
2181
+ case " directives " :
2182
+ return . array( directives)
2183
+ case " values " :
2184
+ return . array( values)
2185
+ default :
2186
+ return nil
2187
+ }
2188
+ }
2056
2189
}
2057
2190
2058
2191
extension EnumTypeDefinition : Equatable {
@@ -2082,6 +2215,19 @@ public final class EnumValueDefinition {
2082
2215
self . name = name
2083
2216
self . directives = directives
2084
2217
}
2218
+
2219
+ public func get( key: String ) -> NodeResult ? {
2220
+ switch key {
2221
+ case " description " :
2222
+ return description. map { . node( $0) }
2223
+ case " name " :
2224
+ return . node( name)
2225
+ case " directives " :
2226
+ return . array( directives)
2227
+ default :
2228
+ return nil
2229
+ }
2230
+ }
2085
2231
}
2086
2232
2087
2233
extension EnumValueDefinition : Equatable {
@@ -2113,6 +2259,21 @@ public final class InputObjectTypeDefinition {
2113
2259
self . directives = directives
2114
2260
self . fields = fields
2115
2261
}
2262
+
2263
+ public func get( key: String ) -> NodeResult ? {
2264
+ switch key {
2265
+ case " description " :
2266
+ return description. map { . node( $0) }
2267
+ case " name " :
2268
+ return . node( name)
2269
+ case " directives " :
2270
+ return . array( directives)
2271
+ case " fields " :
2272
+ return . array( fields)
2273
+ default :
2274
+ return nil
2275
+ }
2276
+ }
2116
2277
}
2117
2278
2118
2279
extension InputObjectTypeDefinition : Equatable {
@@ -2133,6 +2294,10 @@ public final class TypeExtensionDefinition {
2133
2294
self . loc = loc
2134
2295
self . definition = definition
2135
2296
}
2297
+
2298
+ public func get( key: String ) -> NodeResult ? {
2299
+ definition. get ( key: key)
2300
+ }
2136
2301
}
2137
2302
2138
2303
extension TypeExtensionDefinition : Equatable {
@@ -2150,6 +2315,10 @@ public final class SchemaExtensionDefinition {
2150
2315
self . loc = loc
2151
2316
self . definition = definition
2152
2317
}
2318
+
2319
+ public func get( key: String ) -> NodeResult ? {
2320
+ definition. get ( key: key)
2321
+ }
2153
2322
}
2154
2323
2155
2324
extension SchemaExtensionDefinition : Equatable {
@@ -2167,6 +2336,10 @@ public final class InterfaceExtensionDefinition {
2167
2336
self . loc = loc
2168
2337
self . definition = definition
2169
2338
}
2339
+
2340
+ public func get( key: String ) -> NodeResult ? {
2341
+ definition. get ( key: key)
2342
+ }
2170
2343
}
2171
2344
2172
2345
extension InterfaceExtensionDefinition : Equatable {
@@ -2189,6 +2362,10 @@ public final class ScalarExtensionDefinition {
2189
2362
self . definition = definition
2190
2363
self . directives = directives
2191
2364
}
2365
+
2366
+ public func get( key: String ) -> NodeResult ? {
2367
+ definition. get ( key: key)
2368
+ }
2192
2369
}
2193
2370
2194
2371
extension ScalarExtensionDefinition : Equatable {
@@ -2206,6 +2383,10 @@ public final class UnionExtensionDefinition {
2206
2383
self . loc = loc
2207
2384
self . definition = definition
2208
2385
}
2386
+
2387
+ public func get( key: String ) -> NodeResult ? {
2388
+ definition. get ( key: key)
2389
+ }
2209
2390
}
2210
2391
2211
2392
extension UnionExtensionDefinition : Equatable {
@@ -2223,6 +2404,10 @@ public final class EnumExtensionDefinition {
2223
2404
self . loc = loc
2224
2405
self . definition = definition
2225
2406
}
2407
+
2408
+ public func get( key: String ) -> NodeResult ? {
2409
+ definition. get ( key: key)
2410
+ }
2226
2411
}
2227
2412
2228
2413
extension EnumExtensionDefinition : Equatable {
@@ -2240,6 +2425,10 @@ public final class InputObjectExtensionDefinition {
2240
2425
self . loc = loc
2241
2426
self . definition = definition
2242
2427
}
2428
+
2429
+ public func get( key: String ) -> NodeResult ? {
2430
+ definition. get ( key: key)
2431
+ }
2243
2432
}
2244
2433
2245
2434
extension InputObjectExtensionDefinition : Equatable {
@@ -2275,6 +2464,21 @@ public final class DirectiveDefinition {
2275
2464
self . locations = locations
2276
2465
self . repeatable = repeatable
2277
2466
}
2467
+
2468
+ public func get( key: String ) -> NodeResult ? {
2469
+ switch key {
2470
+ case " description " :
2471
+ return description. map { . node( $0) }
2472
+ case " name " :
2473
+ return . node( name)
2474
+ case " arguments " :
2475
+ return . array( arguments)
2476
+ case " locations " :
2477
+ return . array( locations)
2478
+ default :
2479
+ return nil
2480
+ }
2481
+ }
2278
2482
}
2279
2483
2280
2484
extension DirectiveDefinition : Equatable {
0 commit comments