Skip to content

Commit 2e0ebd8

Browse files
committed
print_schema: replace chain with asterisk and update comment
Replicates graphql/graphql-js@ff54195
1 parent c2566da commit 2e0ebd8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/graphql/utilities/print_schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from itertools import chain
21
from typing import Any, Callable, Dict, List, Optional, Union, cast
32

43
from ..language import print_ast
@@ -57,10 +56,10 @@ def print_filtered_schema(
5756
types = filter(type_filter, schema.type_map.values())
5857

5958
return "\n\n".join(
60-
chain(
61-
filter(None, [print_schema_definition(schema)]),
62-
(print_directive(directive) for directive in directives),
63-
(print_type(type_) for type_ in types),
59+
(
60+
*filter(None, (print_schema_definition(schema),)),
61+
*map(print_directive, directives),
62+
*map(print_type, types),
6463
)
6564
)
6665

@@ -96,6 +95,7 @@ def is_schema_of_common_names(schema: GraphQLSchema) -> bool:
9695
schema {
9796
query: Query
9897
mutation: Mutation
98+
subscription: Subscription
9999
}
100100
101101
When using this naming convention, the schema description can be omitted.

0 commit comments

Comments
 (0)