hasura / hasura/graphql-engine

Feature Request: CUID and Prefixed IDs

Open
#9,479 1 comment 0 reactions 0 assignees View on GitHub
k/enhancement t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

No

### Describe the solution you'd like

Allow CUID (Collision-resistant ids) to be generated as IDs alongside UUID and regular Int/BigInt IDs.
Also, allow the creation of prefixed IDs per schema. For example, if I have an author schema, I could have a `author_clevcj0g4000008k1gkpk9e6h` as a Id.

### Describe alternatives you've considered

Generating this manually before sending a mutation, but this creates a logic that could be inside Hasura.
Currently Prisma allows CUID natively (through their own ORM) and prefixes can be done via Middleware. But in Hasura it's only possible by messing directly with a query.

Contributor guide

Open the contributing guide

Research direction

The issue does not identify any files, tests, or entry points. Start by locating Hasura's schema ID generation and mutation handling, then determine the required design and validation for CUID generation and schema-level prefixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.