Skip to content

Commit

Permalink
Speedup sorting and building/extending schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Sep 14, 2024
1 parent eb9edd5 commit 7134b68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/graphql/utilities/extend_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ def extend_schema_args(
return schema_kwargs

self = cls(type_extensions)
for existing_type in schema_kwargs["types"] or ():
self.type_map[existing_type.name] = self.extend_named_type(existing_type)

self.type_map = {
type_.name: self.extend_named_type(type_)
for type_ in schema_kwargs["types"] or ()
}

for type_node in type_defs:
name = type_node.name.value
self.type_map[name] = std_type_map.get(name) or self.build_type(type_node)
Expand Down

0 comments on commit 7134b68

Please sign in to comment.