graphene-mongo icon indicating copy to clipboard operation
graphene-mongo copied to clipboard

Getting conversion error

Open bansalnaman15 opened this issue 4 years ago • 1 comments

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

bansalnaman15 avatar Apr 01 '21 00:04 bansalnaman15

@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.

adarshdigievo avatar Mar 28 '23 18:03 adarshdigievo