graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
974 stars 225 forks source link

Global ids from objects with composite primary keys are not correctly extracted (again) #388

Closed genericmoniker closed 7 months ago

genericmoniker commented 1 year ago

In #43 a change was made to convert composite keys to a tuple.

graphql-core made a change such that a tuple is no longer accepted as a valid ID (whereas it would previously just call str on the tuple).

The result is an error such as the following when an object of the type is requested with its id field:

ID cannot represent value: (<UUID instance>, <UUID instance>)
erikwrede commented 1 year ago

Thanks for bringing this up! The easiest fix would most likely be to convert tuples to strings manually here: https://github.com/graphql-python/graphene-sqlalchemy/blob/2ca659a7840635a6058f032b9c00488534a07820/graphene_sqlalchemy/types.py#L382-L385

I'll check with the team to make sure this has no other implications and get back to you!

erikwrede commented 7 months ago

sorry for the long wait, this was fixed in #399

github-actions[bot] commented 1 month ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue.