The serializer options currently just passes in the object to transform/serialize.
export type Model = {
tableName: string;
schema: AnyZodObject;
primaryKeys: Array<string>;
serializer?: (obj: object) => object;
serializerSchema?: AnyZodObject;
};
but I would like to access the context (mainly request params) here to decide how to transform it.
Rationale is an expand query param that would allow me to expand some objects in the response.