graphql-python / graphene-mongo

Graphene MongoEngine integration
http://graphene-mongo.readthedocs.io/en/latest/
MIT License
288 stars 113 forks source link

Getting conversion error #174

Open bansalnaman15 opened 3 years ago

bansalnaman15 commented 3 years ago

graphene_mongo.converter.MongoEngineConversionError: Don't know how to convert the MongoEngine field <mongoengine.fields.BinaryField object at 0x000001B649C00250> (<class 'mongoengine.fields.BinaryField'>)

This is what I am getting, Please Help.! Thanks

adarshdigievo commented 1 year ago

@bansalnaman15 Can you give a bit more context here on the type of data stored in the binary and which Graphql scalar you expect the field to be converted into?

As a workaround for now, you may exclude the field from the MongoEngineObjectType to prevent getting this error. If you expect the BinaryField to be converted to a string, you can then define a custom resolver and convert the data explicitly inside the resolver.