@@ -497,6 +497,7 @@ public final class GraphQLFieldDefinition {
497
497
let args : [ GraphQLArgumentDefinition ]
498
498
let resolve : GraphQLFieldResolve ?
499
499
let deprecationReason : String ?
500
+ let isDeprecated : Bool
500
501
501
502
init (
502
503
name: String ,
@@ -512,10 +513,7 @@ public final class GraphQLFieldDefinition {
512
513
self . args = args
513
514
self . resolve = resolve
514
515
self . deprecationReason = deprecationReason
515
- }
516
-
517
- var isDeprecated : Bool {
518
- return deprecationReason != nil
516
+ self . isDeprecated = deprecationReason != nil
519
517
}
520
518
521
519
func replaceTypeReferences( typeMap: TypeMap ) throws {
@@ -902,6 +900,7 @@ func defineEnumValues(
902
900
name: valueName,
903
901
description: value. description,
904
902
deprecationReason: value. deprecationReason,
903
+ isDeprecated: value. deprecationReason != nil ,
905
904
value: value. value
906
905
)
907
906
@@ -933,11 +932,8 @@ struct GraphQLEnumValueDefinition {
933
932
let name : String
934
933
let description : String ?
935
934
let deprecationReason : String ?
935
+ let isDeprecated : Bool
936
936
let value : Map
937
-
938
- var isDeprecated : Bool {
939
- return deprecationReason != nil
940
- }
941
937
}
942
938
943
939
extension GraphQLEnumValueDefinition : MapRepresentable {
@@ -1163,15 +1159,15 @@ extension GraphQLList : Hashable {
1163
1159
*/
1164
1160
public final class GraphQLNonNull {
1165
1161
public let ofType : GraphQLNullableType
1166
-
1162
+
1167
1163
public init ( _ type: GraphQLNullableType ) {
1168
1164
self . ofType = type
1169
1165
}
1170
1166
1171
1167
public init ( _ name: String ) {
1172
1168
self . ofType = GraphQLTypeReference ( name)
1173
1169
}
1174
-
1170
+
1175
1171
var wrappedType : GraphQLType {
1176
1172
return ofType
1177
1173
}
0 commit comments