@kubb/plugin-swr 5.0.0-alpha.9 → 5.0.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +17 -10
  2. package/README.md +33 -26
  3. package/dist/components-ByADeLZO.cjs +1029 -0
  4. package/dist/components-ByADeLZO.cjs.map +1 -0
  5. package/dist/components-CBdpiiay.js +933 -0
  6. package/dist/components-CBdpiiay.js.map +1 -0
  7. package/dist/components.cjs +1 -1
  8. package/dist/components.d.ts +45 -51
  9. package/dist/components.js +1 -1
  10. package/dist/generators-Bb5wNYig.cjs +445 -0
  11. package/dist/generators-Bb5wNYig.cjs.map +1 -0
  12. package/dist/generators-D5kJZsB1.js +434 -0
  13. package/dist/generators-D5kJZsB1.js.map +1 -0
  14. package/dist/generators.cjs +1 -1
  15. package/dist/generators.d.ts +4 -500
  16. package/dist/generators.js +1 -1
  17. package/dist/index.cjs +134 -113
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +130 -113
  21. package/dist/index.js.map +1 -1
  22. package/dist/types-D9jeG3fE.d.ts +220 -0
  23. package/extension.yaml +199 -0
  24. package/package.json +57 -67
  25. package/src/components/Mutation.tsx +106 -227
  26. package/src/components/MutationKey.tsx +25 -1
  27. package/src/components/Query.tsx +75 -140
  28. package/src/components/QueryOptions.tsx +46 -95
  29. package/src/generators/mutationGenerator.tsx +113 -128
  30. package/src/generators/queryGenerator.tsx +125 -137
  31. package/src/index.ts +2 -2
  32. package/src/plugin.ts +117 -170
  33. package/src/resolvers/resolverSwr.ts +56 -0
  34. package/src/types.ts +115 -59
  35. package/src/utils.ts +10 -0
  36. package/dist/components-DRDGvgXG.js +0 -702
  37. package/dist/components-DRDGvgXG.js.map +0 -1
  38. package/dist/components-jd0l9XKn.cjs +0 -780
  39. package/dist/components-jd0l9XKn.cjs.map +0 -1
  40. package/dist/generators-CRSl6u2M.js +0 -399
  41. package/dist/generators-CRSl6u2M.js.map +0 -1
  42. package/dist/generators-D062obA7.cjs +0 -410
  43. package/dist/generators-D062obA7.cjs.map +0 -1
  44. package/dist/types-BIaGRPjD.d.ts +0 -210
@@ -1,123 +1,74 @@
1
- import { getDefaultValue, isOptional } from '@kubb/oas'
2
- import { Client } from '@kubb/plugin-client/components'
3
- import type { OperationSchemas } from '@kubb/plugin-oas'
4
- import { getPathParams } from '@kubb/plugin-oas/utils'
5
- import { File, Function, FunctionParams } from '@kubb/react-fabric'
6
- import type { FabricReactNode } from '@kubb/react-fabric/types'
1
+ import { ast } from '@kubb/core'
2
+ import type { ResolverTs } from '@kubb/plugin-ts'
3
+ import { functionPrinter } from '@kubb/plugin-ts'
4
+ import { File, Function } from '@kubb/renderer-jsx'
5
+ import type { KubbReactNode } from '@kubb/renderer-jsx/types'
6
+ import { getEnabledParamNames, injectNonNullAssertions, markParamsOptional } from '@internals/tanstack-query'
7
7
  import type { PluginSwr } from '../types.ts'
8
+ import { buildQueryKeyParams } from '../utils.ts'
8
9
 
9
10
  type Props = {
10
11
  name: string
11
12
  clientName: string
12
- typeSchemas: OperationSchemas
13
+ node: ast.OperationNode
14
+ tsResolver: ResolverTs
13
15
  paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']
14
16
  paramsType: PluginSwr['resolvedOptions']['paramsType']
15
17
  pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']
16
18
  }
17
19
 
18
- type GetParamsProps = {
19
- paramsType: PluginSwr['resolvedOptions']['paramsType']
20
- paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']
21
- pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']
22
- typeSchemas: OperationSchemas
23
- }
20
+ const declarationPrinter = functionPrinter({ mode: 'declaration' })
21
+ const callPrinter = functionPrinter({ mode: 'call' })
24
22
 
25
- function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {
26
- if (paramsType === 'object') {
27
- const pathParams = getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing })
23
+ export function getQueryOptionsParams(
24
+ node: ast.OperationNode,
25
+ options: {
26
+ paramsType: PluginSwr['resolvedOptions']['paramsType']
27
+ paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']
28
+ pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']
29
+ resolver: ResolverTs
30
+ },
31
+ ): ast.FunctionParametersNode {
32
+ const { paramsType, paramsCasing, pathParamsType, resolver } = options
33
+ const requestName = node.requestBody?.content?.[0]?.schema ? resolver.resolveDataName(node) : undefined
28
34
 
29
- return FunctionParams.factory({
30
- data: {
31
- mode: 'object',
32
- children: {
33
- ...pathParams,
34
- data: typeSchemas.request?.name
35
- ? {
36
- type: typeSchemas.request?.name,
37
- optional: isOptional(typeSchemas.request?.schema),
38
- }
39
- : undefined,
40
- params: typeSchemas.queryParams?.name
41
- ? {
42
- type: typeSchemas.queryParams?.name,
43
- optional: isOptional(typeSchemas.queryParams?.schema),
44
- }
45
- : undefined,
46
- headers: typeSchemas.headerParams?.name
47
- ? {
48
- type: typeSchemas.headerParams?.name,
49
- optional: isOptional(typeSchemas.headerParams?.schema),
50
- }
51
- : undefined,
52
- },
53
- },
54
- config: {
55
- type: typeSchemas.request?.name
56
- ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`
57
- : 'Partial<RequestConfig> & { client?: Client }',
35
+ return ast.createOperationParams(node, {
36
+ paramsType,
37
+ pathParamsType: paramsType === 'object' ? 'object' : pathParamsType === 'object' ? 'object' : 'inline',
38
+ paramsCasing,
39
+ resolver,
40
+ extraParams: [
41
+ ast.createFunctionParameter({
42
+ name: 'config',
43
+ type: ast.createParamsType({
44
+ variant: 'reference',
45
+ name: requestName ? `Partial<RequestConfig<${requestName}>> & { client?: Client }` : 'Partial<RequestConfig> & { client?: Client }',
46
+ }),
58
47
  default: '{}',
59
- },
60
- })
61
- }
62
-
63
- return FunctionParams.factory({
64
- pathParams: typeSchemas.pathParams?.name
65
- ? {
66
- mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',
67
- children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
68
- default: getDefaultValue(typeSchemas.pathParams?.schema),
69
- }
70
- : undefined,
71
- data: typeSchemas.request?.name
72
- ? {
73
- type: typeSchemas.request?.name,
74
- optional: isOptional(typeSchemas.request?.schema),
75
- }
76
- : undefined,
77
- params: typeSchemas.queryParams?.name
78
- ? {
79
- type: typeSchemas.queryParams?.name,
80
- optional: isOptional(typeSchemas.queryParams?.schema),
81
- }
82
- : undefined,
83
- headers: typeSchemas.headerParams?.name
84
- ? {
85
- type: typeSchemas.headerParams?.name,
86
- optional: isOptional(typeSchemas.headerParams?.schema),
87
- }
88
- : undefined,
89
- config: {
90
- type: typeSchemas.request?.name
91
- ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`
92
- : 'Partial<RequestConfig> & { client?: Client }',
93
- default: '{}',
94
- },
48
+ }),
49
+ ],
95
50
  })
96
51
  }
97
52
 
98
- export function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType, pathParamsType }: Props): FabricReactNode {
99
- const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })
100
- const clientParams = Client.getParams({
101
- paramsCasing,
102
- paramsType,
103
- typeSchemas,
104
- pathParamsType,
105
- isConfigurable: true,
106
- })
53
+ export function QueryOptions({ name, clientName, node, tsResolver, paramsCasing, paramsType, pathParamsType }: Props): KubbReactNode {
54
+ const queryKeyParamsNode = buildQueryKeyParams(node, { pathParamsType, paramsCasing, resolver: tsResolver })
55
+ const enabledNames = getEnabledParamNames(queryKeyParamsNode)
56
+
57
+ const paramsNode = markParamsOptional(getQueryOptionsParams(node, { paramsType, paramsCasing, pathParamsType, resolver: tsResolver }), enabledNames)
58
+ const paramsSignature = declarationPrinter.print(paramsNode) ?? ''
59
+ const clientCallStr = injectNonNullAssertions(callPrinter.print(paramsNode) ?? '', enabledNames)
107
60
 
108
61
  return (
109
62
  <File.Source name={name} isExportable isIndexable>
110
- <Function name={name} export params={params.toConstructor()}>
63
+ <Function name={name} export params={paramsSignature}>
111
64
  {`
112
65
  return {
113
66
  fetcher: async () => {
114
- return ${clientName}(${clientParams.toCall()})
67
+ return ${clientName}(${clientCallStr})
115
68
  },
116
69
  }
117
- `}
70
+ `}
118
71
  </Function>
119
72
  </File.Source>
120
73
  )
121
74
  }
122
-
123
- QueryOptions.getParams = getParams
@@ -1,175 +1,160 @@
1
1
  import path from 'node:path'
2
- import { usePluginDriver } from '@kubb/core/hooks'
3
- import { pluginClientName } from '@kubb/plugin-client'
4
- import { Client } from '@kubb/plugin-client/components'
5
- import { createReactGenerator } from '@kubb/plugin-oas/generators'
6
- import { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'
7
- import { getBanner, getFooter } from '@kubb/plugin-oas/utils'
2
+ import { resolveOperationTypeNames } from '@internals/shared'
3
+ import { resolveZodSchemaNames } from '@internals/tanstack-query'
4
+ import { ast, defineGenerator } from '@kubb/core'
5
+ import { Client, pluginClientName } from '@kubb/plugin-client'
8
6
  import { pluginTsName } from '@kubb/plugin-ts'
9
7
  import { pluginZodName } from '@kubb/plugin-zod'
10
- import { File } from '@kubb/react-fabric'
8
+ import { File, jsxRenderer } from '@kubb/renderer-jsx'
11
9
  import { difference } from 'remeda'
12
10
  import { Mutation, MutationKey } from '../components'
13
11
  import type { PluginSwr } from '../types'
14
12
 
15
- export const mutationGenerator = createReactGenerator<PluginSwr>({
13
+ export const mutationGenerator = defineGenerator<PluginSwr>({
16
14
  name: 'swr-mutation',
17
- Operation({ config, operation, generator, plugin }) {
18
- const {
19
- options,
20
- options: { output },
21
- } = plugin
22
- const driver = usePluginDriver()
15
+ renderer: jsxRenderer,
16
+ operation(node, ctx) {
17
+ if (!ast.isHttpOperationNode(node)) return null
18
+ const { config, driver, resolver, root } = ctx
19
+ const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options
23
20
 
24
- const oas = useOas()
25
- const { getSchemas, getName, getFile } = useOperationManager(generator)
21
+ const pluginTs = driver.getPlugin(pluginTsName)
22
+ if (!pluginTs) return null
23
+ const tsResolver = driver.getResolver(pluginTsName)
26
24
 
27
- const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)
25
+ const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))
28
26
  const isMutation =
29
- options.mutation !== false &&
27
+ mutation !== false &&
30
28
  !isQuery &&
31
- difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)
29
+ difference(mutation ? mutation.methods : [], query ? query.methods : []).some((method) => node.method.toLowerCase() === method.toLowerCase())
32
30
 
33
- const importPath = options.mutation ? options.mutation.importPath : 'swr'
31
+ if (!isMutation) return null
34
32
 
35
- const mutation = {
36
- name: getName(operation, { type: 'function', prefix: 'use' }),
37
- typeName: getName(operation, { type: 'type' }),
38
- file: getFile(operation, { prefix: 'use' }),
39
- }
33
+ const importPath = mutation ? mutation.importPath : 'swr/mutation'
40
34
 
41
- const type = {
42
- file: getFile(operation, { pluginName: pluginTsName }),
43
- //todo remove type?
44
- schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),
45
- }
35
+ const mutationHookName = resolver.resolveMutationName(node)
36
+ const mutationKeyName = resolver.resolveMutationKeyName(node)
37
+ const mutationKeyTypeName = resolver.resolveMutationKeyTypeName(node)
38
+ const mutationArgTypeName = resolver.resolveMutationArgTypeName(node)
39
+ const clientName = resolver.resolveClientName(node)
46
40
 
47
- const zod = {
48
- file: getFile(operation, { pluginName: pluginZodName }),
49
- schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),
41
+ const meta = {
42
+ file: resolver.resolveFile({ name: mutationHookName, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),
43
+ fileTs: tsResolver.resolveFile(
44
+ { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },
45
+ { root, output: pluginTs.options?.output ?? output, group: pluginTs.options?.group },
46
+ ),
50
47
  }
51
48
 
52
- const hasClientPlugin = !!driver.getPluginByName(pluginClientName)
53
- // Class-based clients are not compatible with query hooks, so we generate inline clients
54
- const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'
55
- const client = {
56
- name: shouldUseClientPlugin
57
- ? getName(operation, {
58
- type: 'function',
59
- pluginName: pluginClientName,
60
- })
61
- : getName(operation, {
62
- type: 'function',
63
- }),
64
- file: getFile(operation, { pluginName: pluginClientName }),
65
- }
49
+ const importedTypeNames = resolveOperationTypeNames(node, tsResolver, { paramsCasing, order: 'body-response-first' })
66
50
 
67
- const mutationKey = {
68
- name: getName(operation, { type: 'const', suffix: 'MutationKey' }),
69
- typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),
70
- }
51
+ const pluginZod = parser === 'zod' ? driver.getPlugin(pluginZodName) : undefined
52
+ const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : undefined
53
+ const fileZod = zodResolver
54
+ ? zodResolver.resolveFile(
55
+ { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },
56
+ { root, output: pluginZod?.options?.output ?? output, group: pluginZod?.options?.group },
57
+ )
58
+ : undefined
59
+ const zodSchemaNames = resolveZodSchemaNames(node, zodResolver)
71
60
 
72
- if (!isMutation) {
73
- return null
74
- }
61
+ const clientPlugin = driver.getPlugin(pluginClientName)
62
+ const hasClientPlugin = clientPlugin?.name === pluginClientName
63
+ const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'
64
+ const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : undefined
65
+
66
+ const clientFile = shouldUseClientPlugin
67
+ ? clientResolver?.resolveFile(
68
+ { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },
69
+ {
70
+ root,
71
+ output: clientPlugin?.options?.output ?? output,
72
+ group: clientPlugin?.options?.group,
73
+ },
74
+ )
75
+ : undefined
76
+
77
+ const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientName) : clientName
75
78
 
76
79
  return (
77
80
  <File
78
- baseName={mutation.file.baseName}
79
- path={mutation.file.path}
80
- meta={mutation.file.meta}
81
- banner={getBanner({ oas, output, config: driver.config })}
82
- footer={getFooter({ oas, output })}
81
+ baseName={meta.file.baseName}
82
+ path={meta.file.path}
83
+ meta={meta.file.meta}
84
+ banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}
85
+ footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}
83
86
  >
84
- {options.parser === 'zod' && (
85
- <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />
86
- )}
87
- {options.client.importPath ? (
87
+ {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}
88
+ {clientOptions.importPath ? (
88
89
  <>
89
- {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}
90
- <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
91
- {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
90
+ {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}
91
+ <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />
92
+ {clientOptions.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={clientOptions.importPath} isTypeOnly />}
92
93
  </>
93
94
  ) : (
94
95
  <>
95
- {!shouldUseClientPlugin && (
96
- <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
97
- )}
96
+ {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}
98
97
  <File.Import
99
98
  name={['Client', 'RequestConfig', 'ResponseErrorConfig']}
100
- root={mutation.file.path}
101
- path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
99
+ root={meta.file.path}
100
+ path={path.resolve(root, '.kubb/client.ts')}
102
101
  isTypeOnly
103
102
  />
104
- {options.client.dataReturnType === 'full' && (
105
- <File.Import
106
- name={['ResponseConfig']}
107
- root={mutation.file.path}
108
- path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
109
- isTypeOnly
110
- />
103
+ {clientOptions.dataReturnType === 'full' && (
104
+ <File.Import name={['ResponseConfig']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} isTypeOnly />
111
105
  )}
112
106
  </>
113
107
  )}
114
- <File.Import name="useSWRMutation" path={importPath} />
115
- <File.Import name={['SWRMutationConfiguration', 'SWRMutationResponse']} path={importPath} isTypeOnly />
116
- {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}
117
- {!shouldUseClientPlugin && (
118
- <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />
108
+ {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}
109
+ {!shouldUseClientPlugin && node.requestBody?.content?.some((e) => e.contentType === 'multipart/form-data') && (
110
+ <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />
111
+ )}
112
+ {meta.fileTs && importedTypeNames.length > 0 && (
113
+ <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />
119
114
  )}
120
- <File.Import
121
- name={[
122
- type.schemas.request?.name,
123
- type.schemas.response.name,
124
- type.schemas.pathParams?.name,
125
- type.schemas.queryParams?.name,
126
- type.schemas.headerParams?.name,
127
- ...(type.schemas.statusCodes?.map((item) => item.name) || []),
128
- ].filter(Boolean)}
129
- root={mutation.file.path}
130
- path={type.file.path}
131
- isTypeOnly
132
- />
133
115
 
134
116
  <MutationKey
135
- name={mutationKey.name}
136
- typeName={mutationKey.typeName}
137
- operation={operation}
138
- pathParamsType={options.pathParamsType}
139
- typeSchemas={type.schemas}
140
- paramsCasing={options.paramsCasing}
141
- transformer={options.mutationKey}
117
+ name={mutationKeyName}
118
+ typeName={mutationKeyTypeName}
119
+ node={node}
120
+ pathParamsType={pathParamsType}
121
+ paramsCasing={paramsCasing}
122
+ transformer={ctx.options.mutationKey}
142
123
  />
143
124
 
144
125
  {!shouldUseClientPlugin && (
145
126
  <Client
146
- name={client.name}
147
- baseURL={options.client.baseURL}
148
- operation={operation}
149
- typeSchemas={type.schemas}
150
- zodSchemas={zod.schemas}
151
- dataReturnType={options.client.dataReturnType || 'data'}
152
- paramsCasing={options.client?.paramsCasing || options.paramsCasing}
153
- paramsType={options.paramsType}
154
- pathParamsType={options.pathParamsType}
155
- parser={options.parser}
127
+ name={resolvedClientName}
128
+ baseURL={clientOptions.baseURL}
129
+ dataReturnType={clientOptions.dataReturnType || 'data'}
130
+ paramsCasing={clientOptions.paramsCasing || paramsCasing}
131
+ paramsType={paramsType}
132
+ pathParamsType={pathParamsType}
133
+ parser={parser}
134
+ node={node}
135
+ tsResolver={tsResolver}
136
+ zodResolver={zodResolver}
156
137
  />
157
138
  )}
158
- {options.mutation && (
159
- <Mutation
160
- name={mutation.name}
161
- clientName={client.name}
162
- typeName={mutation.typeName}
163
- typeSchemas={type.schemas}
164
- operation={operation}
165
- dataReturnType={options.client.dataReturnType || 'data'}
166
- paramsType={options.paramsType}
167
- paramsCasing={options.paramsCasing}
168
- pathParamsType={options.pathParamsType}
169
- mutationKeyName={mutationKey.name}
170
- mutationKeyTypeName={mutationKey.typeName}
171
- paramsToTrigger={options.mutation.paramsToTrigger}
172
- />
139
+
140
+ {mutation && (
141
+ <>
142
+ <File.Import name={'useSWRMutation'} path={importPath} />
143
+ <File.Import name={['SWRMutationConfiguration']} path={importPath} isTypeOnly />
144
+ <Mutation
145
+ name={mutationHookName}
146
+ clientName={resolvedClientName}
147
+ mutationKeyName={mutationKeyName}
148
+ mutationKeyTypeName={mutationKeyTypeName}
149
+ mutationArgTypeName={mutationArgTypeName}
150
+ node={node}
151
+ tsResolver={tsResolver}
152
+ dataReturnType={clientOptions.dataReturnType || 'data'}
153
+ paramsCasing={paramsCasing}
154
+ paramsType={paramsType}
155
+ pathParamsType={pathParamsType}
156
+ />
157
+ </>
173
158
  )}
174
159
  </File>
175
160
  )