@@ -3,10 +3,7 @@ import type ts from 'typescript';
3
3
import type { GeneratedFile } from '../../../generate/file' ;
4
4
import type { IR } from '../../../ir/types' ;
5
5
import { tsc } from '../../../tsc' ;
6
- import {
7
- createOperationComment ,
8
- isOperationOptionsRequired ,
9
- } from '../../shared/utils/operation' ;
6
+ import { createOperationComment } from '../../shared/utils/operation' ;
10
7
import { handleMeta } from './meta' ;
11
8
import type { PluginState } from './state' ;
12
9
import type { PiniaColadaPlugin } from './types' ;
@@ -129,11 +126,6 @@ export const createMutationOptions = ({
129
126
} ) ;
130
127
}
131
128
132
- const isRequiredOptionsForMutation = isOperationOptionsRequired ( {
133
- context : plugin . context ,
134
- operation,
135
- } ) ;
136
-
137
129
const statement = tsc . constVariable ( {
138
130
comment : plugin . config . comments
139
131
? createOperationComment ( { operation } )
@@ -142,9 +134,9 @@ export const createMutationOptions = ({
142
134
expression : tsc . arrowFunction ( {
143
135
parameters : [
144
136
{
145
- isRequired : isRequiredOptionsForMutation ,
137
+ isRequired : false ,
146
138
name : 'options' ,
147
- type : typeData ,
139
+ type : `Partial< ${ typeData } >` ,
148
140
} ,
149
141
] ,
150
142
// TODO: better types syntax
0 commit comments