Skip to content

Commit 4d25f6c

Browse files
authored
[workflow] Pass JSON deserializer in workflowClient() (#408)
1 parent c3ac28e commit 4d25f6c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/restate-sdk/src/context_impl.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,14 @@ export class ContextImpl implements ObjectContext, WorkflowContext {
135135
get: (_target, prop) => {
136136
const route = prop as string;
137137
return (...args: unknown[]) => {
138-
const requestBytes = serializeJson(args.shift());
139-
return this.invoke(name, route, requestBytes, key);
138+
return this.invoke(
139+
name,
140+
route,
141+
args.shift(),
142+
key,
143+
serializeJson,
144+
deserializeJson
145+
);
140146
};
141147
},
142148
}

0 commit comments

Comments
 (0)