edgedb-js
edgedb-js copied to clipboard
Custom naming strategy
The whole JS ecosystem has the camel case convention for property names.
It would be nice if this JS client supports the same naming strategy feature from the DotNet client https://docs.edgedb.com/libraries/dotnet/customtypes#using-a-naming-strategy, so the property names in query results could be camel case enforced.
Why not name your schema in camel case? that's what I do.
Why not name your schema in camel case? that's what I do.
It feels a bit inconsistent, because both the SDL and EdgeQL use snake case for everything.
IMO that's the lesser evil, than trying to have naming translation for a specific client. In practice we have very little snake case; pretty much just the builtin functions.
I agree that a naming translation is bad, but it would be nice if we can do like Drizzle where you can "alias" the property name:
{ myAge: integer('my_age') }
The SDL could support something like:
type Movie {
required title: str;
release_year as releaseYear: int64;
}
That way I can follow the naming conventions of EdgeQL and match the naming conventions of TypeScript.