chaingraph icon indicating copy to clipboard operation
chaingraph copied to clipboard

Return `bytea` hex values without `\\x` prefix

Open bitjson opened this issue 4 years ago • 1 comments

By default, Hasura returns bytea values (the type used by Chaingraph for binary data) in the bytea hex format, which is prefixed with \x (which when escaped in JSON responses, looks like \\x). There's an open issue about returning values in other formats, but no movement to make this default configurable (beyond using computed fields and hiding the source field from the public schema): https://github.com/hasura/graphql-engine/issues/3336

Chaingraph v1 stuck with this default, but it would be nice to polish the API in v2 to not require these unexpected prefixes.

The view strategy in #29 might be a perfect solution to this issue. When #29 is implemented, we should hex-encode (encode(VALUE, 'hex')) every bytea value at the view layer such that Hasura exposes the fields as strings.

bitjson avatar Nov 24 '21 08:11 bitjson

Any news about this feature?

poka-IT avatar Mar 06 '24 02:03 poka-IT