Support to read request params
Cryrivers opened this issue · comments
Zhongliang Wang commented
Tan Li Hau commented
I have a suggestion, how about not using magic type unstable_Query
,
we define mock endpoints as function?
like:
export type GET = {
// backward compatible
"/user/profile": WithResponse<UserProfile>;
// no param
"/user/profile": () => WithResponse<UserProfile>;
// param
"/user/profile": (getParam: GetParam<{id: string}>) => WithResponse<UserProfile>;
}
Zhongliang Wang commented
Could elaborate more on it?