Skip to content

Commit b86b5a7

Browse files
committed
Merge branch 'refs/heads/master' into sqlalchemy
2 parents 6f7e00a + b281bff commit b86b5a7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

graphene/relay/types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,13 @@ class Node(six.with_metaclass(NodeMeta, Interface)):
125125
class Meta:
126126
abstract = True
127127

128+
@classmethod
129+
def global_id(cls, id):
130+
type_name = cls._meta.type_name
131+
return to_global_id(type_name, id)
132+
128133
def to_global_id(self):
129-
type_name = self._meta.type_name
130-
return to_global_id(type_name, self.id)
134+
return self.global_id(self.id)
131135

132136
connection_type = Connection
133137
edge_type = Edge

0 commit comments

Comments
 (0)