-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: schema #229
fix: schema #229
Conversation
update to auto-increment
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import { type IsomerSiteProps } from '@opengovsg/isomer-components' | ||
|
||
export type Navbar = { items: IsomerSiteProps['navBarItems'] } | ||
|
||
export interface FooterItem { | ||
title: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is cherry-picked, downstream will refer correctly to IsomerSiteProps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No blocking comments
|
||
export type Navbar = { items: IsomerSiteProps['navBarItems'] } | ||
|
||
export interface FooterItem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I suspect most of the types that we need on the CMS should be able to be derived from the exported props one way or another, so we might not need to re-define them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported for ease of use cos it's very tedious to type Isomer...['...']
every time ._.
remove / add type
role: RoleType | ||
} | ||
export type Resource = { | ||
id: string | ||
id: GeneratedAlways<number> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change affect the current tRPC schema, specifically the types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, they've been updated here
Problem
Original schema specifies
cuid
, which is problematic on 2 frontsString
instead ofGeneratedAlways<String>
.Solution
GeneratedAlways