Skip to content

Commit ce9028c

Browse files
authored
fix: Optional parameters in mutation. Related to #11 (#13)
1 parent 589c7cb commit ce9028c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/createUseMutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const createUseMutation = (
5959
ts.factory.createIdentifier(
6060
param.name.getText(node)
6161
),
62-
undefined,
62+
param.questionToken ?? param.initializer ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : param.questionToken,
6363
param.type
6464
);
6565
})

0 commit comments

Comments
 (0)