@@ -252,6 +252,9 @@ def to_kwargs(self) -> Dict[str, Any]:
252
252
extension_ast_nodes = self .extension_ast_nodes or FrozenList (),
253
253
)
254
254
255
+ def __copy__ (self ) -> "GraphQLNamedType" : # pragma: no cover
256
+ return self .__class__ (** self .to_kwargs ())
257
+
255
258
256
259
def is_named_type (type_ : Any ) -> bool :
257
260
return isinstance (type_ , GraphQLNamedType )
@@ -428,6 +431,9 @@ def to_kwargs(self) -> Dict[str, Any]:
428
431
specified_by_url = self .specified_by_url ,
429
432
)
430
433
434
+ def __copy__ (self ) -> "GraphQLScalarType" : # pragma: no cover
435
+ return self .__class__ (** self .to_kwargs ())
436
+
431
437
432
438
def is_scalar_type (type_ : Any ) -> bool :
433
439
return isinstance (type_ , GraphQLScalarType )
@@ -539,6 +545,9 @@ def to_kwargs(self) -> Dict[str, Any]:
539
545
ast_node = self .ast_node ,
540
546
)
541
547
548
+ def __copy__ (self ) -> "GraphQLField" : # pragma: no cover
549
+ return self .__class__ (** self .to_kwargs ())
550
+
542
551
@property
543
552
def is_deprecated (self ) -> bool :
544
553
return self .deprecation_reason is not None
@@ -649,6 +658,9 @@ def to_kwargs(self) -> Dict[str, Any]:
649
658
ast_node = self .ast_node ,
650
659
)
651
660
661
+ def __copy__ (self ) -> "GraphQLArgument" : # pragma: no cover
662
+ return self .__class__ (** self .to_kwargs ())
663
+
652
664
653
665
def is_required_argument (arg : GraphQLArgument ) -> bool :
654
666
return is_non_null_type (arg .type ) and arg .default_value is Undefined
@@ -736,6 +748,9 @@ def to_kwargs(self) -> Dict[str, Any]:
736
748
is_type_of = self .is_type_of ,
737
749
)
738
750
751
+ def __copy__ (self ) -> "GraphQLObjectType" : # pragma: no cover
752
+ return self .__class__ (** self .to_kwargs ())
753
+
739
754
@cached_property
740
755
def fields (self ) -> GraphQLFieldMap :
741
756
"""Get provided fields, wrapping them as GraphQLFields if needed."""
@@ -856,6 +871,9 @@ def to_kwargs(self) -> Dict[str, Any]:
856
871
resolve_type = self .resolve_type ,
857
872
)
858
873
874
+ def __copy__ (self ) -> "GraphQLInterfaceType" : # pragma: no cover
875
+ return self .__class__ (** self .to_kwargs ())
876
+
859
877
@cached_property
860
878
def fields (self ) -> GraphQLFieldMap :
861
879
"""Get provided fields, wrapping them as GraphQLFields if needed."""
@@ -974,6 +992,9 @@ def to_kwargs(self) -> Dict[str, Any]:
974
992
** super ().to_kwargs (), types = self .types , resolve_type = self .resolve_type
975
993
)
976
994
995
+ def __copy__ (self ) -> "GraphQLUnionType" : # pragma: no cover
996
+ return self .__class__ (** self .to_kwargs ())
997
+
977
998
@cached_property
978
999
def types (self ) -> List [GraphQLObjectType ]:
979
1000
"""Get provided types."""
@@ -1095,6 +1116,9 @@ def __init__(
1095
1116
def to_kwargs (self ) -> Dict [str , Any ]:
1096
1117
return dict (** super ().to_kwargs (), values = self .values .copy ())
1097
1118
1119
+ def __copy__ (self ) -> "GraphQLEnumType" : # pragma: no cover
1120
+ return self .__class__ (** self .to_kwargs ())
1121
+
1098
1122
@cached_property
1099
1123
def _value_lookup (self ) -> Dict [Any , str ]:
1100
1124
# use first value or name as lookup
@@ -1232,6 +1256,9 @@ def to_kwargs(self) -> Dict[str, Any]:
1232
1256
ast_node = self .ast_node ,
1233
1257
)
1234
1258
1259
+ def __copy__ (self ) -> "GraphQLEnumValue" : # pragma: no cover
1260
+ return self .__class__ (** self .to_kwargs ())
1261
+
1235
1262
@property
1236
1263
def is_deprecated (self ) -> bool :
1237
1264
return self .deprecation_reason is not None
@@ -1321,6 +1348,9 @@ def to_kwargs(self) -> Dict[str, Any]:
1321
1348
else self .out_type ,
1322
1349
)
1323
1350
1351
+ def __copy__ (self ) -> "GraphQLInputObjectType" : # pragma: no cover
1352
+ return self .__class__ (** self .to_kwargs ())
1353
+
1324
1354
@cached_property
1325
1355
def fields (self ) -> GraphQLInputFieldMap :
1326
1356
"""Get provided fields, wrap them as GraphQLInputField if needed."""
@@ -1422,6 +1452,9 @@ def to_kwargs(self) -> Dict[str, Any]:
1422
1452
ast_node = self .ast_node ,
1423
1453
)
1424
1454
1455
+ def __copy__ (self ) -> "GraphQLInputField" : # pragma: no cover
1456
+ return self .__class__ (** self .to_kwargs ())
1457
+
1425
1458
1426
1459
def is_required_input_field (field : GraphQLInputField ) -> bool :
1427
1460
return is_non_null_type (field .type ) and field .default_value is Undefined
0 commit comments