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

Don't know how to convert the MongoEngine field <mongoengine.fields.BinaryField

Open xiangxn opened this issue 3 years ago • 3 comments

Can this field be supported?

xiangxn avatar Mar 19 '22 15:03 xiangxn

@abawchen @arunsureshkumar @adarshdigievo Any thoughts on this?

I believe supporting BinaryField may not be feasible, especially for large binary data, as we would need to convert binary data into encoded text.

abhinand-c avatar Mar 28 '23 17:03 abhinand-c

Simillar to #174

abhinand-c avatar Mar 28 '23 18:03 abhinand-c

@abhinand-c I don't think an automatic conversion will work for BinaryField since this can be used to store arbitrary binary data.

@xiangxn Can you give a bit more context here on the type of data stored 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