hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.03k stars 2.76k forks source link

Use hashids to hide serial ID's #2218

Open karibertils opened 5 years ago

karibertils commented 5 years ago

For some scenarios it can be useful to hide the ID's to prevent data leak, like how many users are signing up on a platform, growth data etc. And also preventing users to query other items if they know the id on another. I know we can use UUID, but that bloats db, network & client alot.

One pretty mature solution is on https://hashids.org/

It would be awesome, if Hasura could transform IDs to/from hashids. So postgres can store int/bigint PK, but the API would only use the hash ids.

bitjson commented 4 years ago

Does anyone have a working solution for this yet? I'd love to know if/how others are avoiding leaking row counts in their applications.

polRk commented 4 years ago

https://github.com/array-analytics/plpg_hashids

HananoshikaYomaru commented 2 years ago

Any update on this?