Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return bytea hex values without \\x prefix #48

Open
bitjson opened this issue Nov 24, 2021 · 1 comment
Open

Return bytea hex values without \\x prefix #48

bitjson opened this issue Nov 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@bitjson
Copy link
Member

bitjson commented Nov 24, 2021

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): hasura/graphql-engine#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.

@poka-IT
Copy link

poka-IT commented Mar 6, 2024

Any news about this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants