Skip to content

Commit 8e713a1

Browse files
committed
Add support for passing name to enum_value
1 parent 79ba938 commit 8e713a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

strawberry/federation/enum.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
def enum_value(
2222
value: Any,
23+
name: Optional[str] = None,
2324
deprecation_reason: Optional[str] = None,
2425
directives: Iterable[object] = (),
2526
inaccessible: bool = False,
@@ -35,7 +36,12 @@ def enum_value(
3536
if tags:
3637
directives.extend(Tag(name=tag) for tag in tags)
3738

38-
return base_enum_value(value, deprecation_reason, directives)
39+
return base_enum_value(
40+
value=value,
41+
name=name,
42+
deprecation_reason=deprecation_reason,
43+
directives=directives,
44+
)
3945

4046

4147
@overload

0 commit comments

Comments
 (0)