Closed
Description
Library returns B64 encoded ID fields instead normal int IDs as they are defined in my models. Right now I am using workaround where I define custom row_id
field and resolver for each model:
class CertificationGraphQL(CountableSQLAlchemyObjectType):
class Meta:
model = Certification
interfaces = (Node, )
row_id = BigInt()
def resolve_row_id(self, info):
return self.id
Can I globally disable B64 IDs? This is similar question as the issue #102.
I tried putting following code in my graphql/models.py
file to try to revert this behavior:
@convert_sqlalchemy_type.register(BigInteger)
def convert_column_to_int_or_id(type, column, registry=None):
return BigInt(description=get_column_doc(column),
required=not (is_column_nullable(column)))
...but no dice. Graphene still converts id
fields to B64 encoded pairs.
Any insight would be appreciated.