We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 030e5e1 commit bcc6bc0Copy full SHA for bcc6bc0
1 file changed
graphene_sqlalchemy/types.py
@@ -141,5 +141,6 @@ def get_node(cls, id, context, info):
141
def resolve_id(self, args, context, info):
142
graphene_type = info.parent_type.graphene_type
143
if is_node(graphene_type):
144
- return self.__mapper__.primary_key_from_instance(self)[0]
+ keys = self.__mapper__.primary_key_from_instance(self)
145
+ return tuple(keys) if len(keys) > 1 else keys[0]
146
return getattr(self, graphene_type._meta.id, None)
0 commit comments