@@ -20,11 +20,11 @@ class PydanticInputObjectTypeOptions(InputObjectTypeOptions):
2020
2121
2222def construct_fields (
23- obj_type : T .Type ["PydanticInputObjectType" ],
24- model : T .Type [pydantic .BaseModel ],
25- registry : Registry ,
26- only_fields : T .Tuple [str , ...],
27- exclude_fields : T .Tuple [str , ...],
23+ obj_type : T .Type ["PydanticInputObjectType" ],
24+ model : T .Type [pydantic .BaseModel ],
25+ registry : Registry ,
26+ only_fields : T .Tuple [str , ...],
27+ exclude_fields : T .Tuple [str , ...],
2828) -> T .Dict [str , InputField ]:
2929 """
3030 Construct all the fields for a PydanticInputObjectType.
@@ -45,7 +45,6 @@ def construct_fields(
4545
4646 fields = {}
4747 for name , field in fields_to_convert :
48-
4948 # Graphql does not accept union as input. Refer https://github.com/graphql/graphql-spec/issues/488
5049 if isinstance (getattr (field , "annotation" , None ), UnionType ):
5150 union_types = field .annotation .__args__
@@ -71,15 +70,15 @@ class PydanticInputObjectType(graphene.InputObjectType):
7170
7271 @classmethod
7372 def __init_subclass_with_meta__ (
74- cls ,
75- model : type = None ,
76- registry : Registry = None ,
77- skip_registry : bool = False ,
78- only_fields : T .Tuple [str , ...] = (),
79- exclude_fields : T .Tuple [str , ...] = (),
80- id = None ,
81- _meta = None ,
82- ** options ,
73+ cls ,
74+ model : type = None ,
75+ registry : Registry = None ,
76+ skip_registry : bool = False ,
77+ only_fields : T .Tuple [str , ...] = (),
78+ exclude_fields : T .Tuple [str , ...] = (),
79+ id = None ,
80+ _meta = None ,
81+ ** options ,
8382 ):
8483 assert model and issubclass (
8584 model , pydantic .BaseModel
0 commit comments