Skip to content

Commit 72db72d

Browse files
committed
fix: support for new graphene-federation
drop support for python 3.8
1 parent 8fd26f2 commit 72db72d

File tree

3 files changed

+207
-198
lines changed

3 files changed

+207
-198
lines changed

graphene_mongo/advanced_types.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import base64
22

33
import graphene
4+
from graphene_federation import shareable
45

56

7+
@shareable # Support Graphene Federation v2
68
class FileFieldType(graphene.ObjectType):
79
content_type = graphene.String()
810
md5 = graphene.String()
911
chunk_size = graphene.Int()
1012
length = graphene.Int()
1113
data = graphene.String()
1214

13-
# Support Graphene Federation v2
14-
_shareable = True
15-
1615
@classmethod
1716
def _resolve_fs_field(cls, field, name, default_value=None):
1817
v = getattr(field.instance, field.key)
@@ -38,12 +37,10 @@ def resolve_data(self, info):
3837
return None
3938

4039

40+
@shareable # Support Graphene Federation v2
4141
class _CoordinatesTypeField(graphene.ObjectType):
4242
type = graphene.String()
4343

44-
# Support Graphene Federation v2
45-
_shareable = True
46-
4744
def resolve_type(self, info):
4845
return self["type"]
4946

0 commit comments

Comments
 (0)