Skip to content

Commit 689357c

Browse files
committed
fix: @sharable is applied multiple times on PageInfo in multithreaded environments
1 parent bee1ded commit 689357c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphene_federation/schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from graphene import ObjectType, PageInfo
55
from graphene_directives import (
6+
DirectiveValidationError,
67
SchemaDirective,
78
build_schema as build_directive_schema,
89
directive_decorator,
@@ -58,6 +59,9 @@ def _add_sharable_to_page_info_type(
5859
except ValueError:
5960
# Federation Version does not support @sharable
6061
pass
62+
except DirectiveValidationError:
63+
# In multithreaded environments, @sharable is applied multiple times on PageInfo
64+
pass
6165

6266

6367
def build_schema(

0 commit comments

Comments
 (0)