when i print the id before returning, the code print the right value ( same with id in mongo ). but the client received a deferent id.
my query code :
def resolve_account(root, info, **kwargs):
email = kwargs.get('email', None)
password = kwargs.get('password', None)
accounts = AccountModel.objects(email=email, password=password)
if accounts.first() is None:
return ResponseMessageField(is_success=False, message="Not found")
print(accounts[0].id)
return AccountResults(accounts=[AccountField(id=account.id,
name=account.name)
for account in accounts])
console printed : `5e5f28a41e92b7cdb5cf30ea'
but my client received :
{
"data": {
"accountLogin": {
"accounts": [
{
"name": "test1",
"id": "QWNjb3VudEZpZWxkOjVlNWYyOGE0MWU5MmI3Y2RiNWNmMzBlYQ=="
}
]
}
}
}
python 3.6.9
mongoengine 0.1.9
graphene 2.1.8
graphene_mongo 0.1.1
flask 1.1.1