Skip to content

Commit c21acf3

Browse files
committed
Minor simplification
Replicates graphql/graphql-relay-js@8b5a9a2
1 parent c4e28e9 commit c21acf3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/graphql_relay/connection/connection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ def connection_definitions(
106106
The nodes of the returned object types will be of the specified type.
107107
"""
108108
name = name or get_named_type(node_type).name
109-
edge_fields = edge_fields or {}
110-
connection_fields = connection_fields or {}
111109

112110
edge_type = GraphQLObjectType(
113111
name + "Edge",
@@ -123,7 +121,7 @@ def connection_definitions(
123121
resolve=resolve_cursor,
124122
description="A cursor for use in pagination",
125123
),
126-
**resolve_maybe_thunk(edge_fields),
124+
**resolve_maybe_thunk(edge_fields or {}),
127125
},
128126
)
129127

@@ -138,7 +136,7 @@ def connection_definitions(
138136
"edges": GraphQLField(
139137
GraphQLList(edge_type), description="A list of edges."
140138
),
141-
**resolve_maybe_thunk(connection_fields),
139+
**resolve_maybe_thunk(connection_fields or {}),
142140
},
143141
)
144142

0 commit comments

Comments
 (0)