mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-20 17:27:45 +02:00
Prepare Relay production infrastructure for the PlanetScale PS_20 HA topology, upgrade Effect and Alchemy to compatible betas, reconcile migration state, and preserve patched MCP session termination behavior.\n\nCo-authored-by: codex <codex@users.noreply.github.com>
23 lines
687 B
TypeScript
23 lines
687 B
TypeScript
/**
|
|
* AppSync Lambda data-source fixture. The JS resolvers under test invoke
|
|
* this function with `{ field, args }` payloads and surface the returned
|
|
* value as the GraphQL result — proving the value was computed here.
|
|
*/
|
|
const handler = async (event: {
|
|
field?: string;
|
|
args?: Record<string, number & string>;
|
|
}) => {
|
|
switch (event?.field) {
|
|
case "add":
|
|
return Number(event.args?.a) + Number(event.args?.b);
|
|
case "double":
|
|
return Number(event.args?.n) * 2;
|
|
case "greet":
|
|
return `Hello, ${event.args?.name}! (from Lambda)`;
|
|
default:
|
|
throw new Error(`Unknown field: ${event?.field}`);
|
|
}
|
|
};
|
|
|
|
export { handler };
|
|
export default handler;
|