In the server, I have defined an enum called BlocksType.
export enum BlocksType {
TEXT = "TEXT",
LINK = "LINK",
GALLERY = "GALLERY",
CONTACT = "CONTACT",
EMAIL = "EMAIL",
RESIDENCE = "RESIDENCE",
SNS = "SNS",
}
The ordering of types is important, with TEXT being the first and SNS being the last. (This order must be maintained.)
However, when generated in the client through codegen, the enum appears in alphabetical order:
export enum BlocksType {
CONTACT = "CONTACT",
EMAIL = "EMAIL",
GALLERY = "GALLERY",
LINK = "LINK",
RESIDENCE = "RESIDENCE",
SNS = "SNS",
TEXT = "TEXT",
}
This raises the question of how to maintain the same order as defined in the server on the client side.