Can a registered converter be shadowed to use a type other than a `graphene` type?
this-vidor opened this issue · 2 comments
this-vidor commented
For example, suppose a developer did not want sqlalchemy.dialects.postgres.HSTORE
to be converted to graphene.types.json.JSONString
. Is there a correct way to accomplish that?
erikwrede commented
The solution is to override the default type converter:
@convert_sqlalchemy_type.register(postgresql.HSTORE)
def convert_json_to_string(type, column, registry=None):
return your_graphene_scalar
This needs to be called before your SQLAlchemyObjectType
s are initialized.
github-actions commented
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.