Skip to content

Commit 74d5057

Browse files
committed
tests(print_schema): test omitting schema of common names
Replicates graphql/graphql-js@faa42e2
1 parent 99b62e8 commit 74d5057

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/utilities/test_print_schema.py

+15
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,21 @@ def prints_schema_with_description():
301301
'''
302302
)
303303

304+
def omits_schema_of_common_names():
305+
schema = GraphQLSchema(query=GraphQLObjectType("Query", {}),
306+
mutation=GraphQLObjectType("Mutation", {}),
307+
subscription=GraphQLObjectType("Subscription", {}))
308+
309+
assert expect_printed_schema(schema) == dedent(
310+
"""
311+
type Query
312+
313+
type Mutation
314+
315+
type Subscription
316+
"""
317+
)
318+
304319
def prints_custom_query_root_types():
305320
schema = GraphQLSchema(query=GraphQLObjectType("CustomType", {}))
306321

0 commit comments

Comments
 (0)