react-query-lightbase-codegen 0.1.8 → 0.1.9

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.
@@ -904,8 +904,8 @@ const generateRestfulComponent = ({ operation, verb, route, operationIds, parame
904
904
  type ${componentName}QueryProps<T = ${componentName}Return> = ${componentName}Variables & {
905
905
  options?: UseQueryOptions<${componentName}Return, AxiosError, T, any>
906
906
  }
907
- export function use${componentName}Query<T = ${componentName}Return>({ options = {}, ...body }: ${componentName}QueryProps<T>) {
908
- return useQuery(use${componentName}Query.queryKey(body), async () => use${componentName}Query.fetch(body),
907
+ export function use${componentName}Query<T = ${componentName}Return>({ options = {}, ...props }: ${componentName}QueryProps<T>) {
908
+ return useQuery(use${componentName}Query.queryKey(props), async () => use${componentName}Query.fetch(props),
909
909
  { enabled: ${enabledParam}, ...options }
910
910
  );}
911
911
 
@@ -884,8 +884,8 @@ export const generateRestfulComponent = ({ operation, verb, route, operationIds,
884
884
  type ${componentName}QueryProps<T = ${componentName}Return> = ${componentName}Variables & {
885
885
  options?: UseQueryOptions<${componentName}Return, AxiosError, T, any>
886
886
  }
887
- export function use${componentName}Query<T = ${componentName}Return>({ options = {}, ...body }: ${componentName}QueryProps<T>) {
888
- return useQuery(use${componentName}Query.queryKey(body), async () => use${componentName}Query.fetch(body),
887
+ export function use${componentName}Query<T = ${componentName}Return>({ options = {}, ...props }: ${componentName}QueryProps<T>) {
888
+ return useQuery(use${componentName}Query.queryKey(props), async () => use${componentName}Query.fetch(props),
889
889
  { enabled: ${enabledParam}, ...options }
890
890
  );}
891
891
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-query-lightbase-codegen",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",