@@ -106,10 +106,16 @@ describe("generateReactQueryComponents", () => {
106106 /**
107107 * Get all the pets
108108 */
109- export const useListPets = (queryKey: reactQuery.QueryKey, variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn(queryKey ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
109+ export const useListPets = (variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn({ path: \\"/pets\\", operationId: \\"listPets\\", variables } ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
110110 ...options,
111111 ...queryOptions
112112 }); };
113+
114+ export type QueryOperation = {
115+ path: \\"/pets\\";
116+ operationId: \\"listPets\\";
117+ variables: ListPetsVariables;
118+ };
113119 "
114120 ` ) ;
115121 } ) ;
@@ -219,10 +225,16 @@ describe("generateReactQueryComponents", () => {
219225 /**
220226 * Get all the pets
221227 */
222- export const useListPets = (queryKey: reactQuery.QueryKey, variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn(queryKey ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
228+ export const useListPets = (variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn({ path: \\"/pets\\", operationId: \\"listPets\\", variables } ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
223229 ...options,
224230 ...queryOptions
225231 }); };
232+
233+ export type QueryOperation = {
234+ path: \\"/pets\\";
235+ operationId: \\"listPets\\";
236+ variables: ListPetsVariables;
237+ };
226238 "
227239 ` ) ;
228240 } ) ;
@@ -336,10 +348,16 @@ describe("generateReactQueryComponents", () => {
336348 /**
337349 * Get all the pets
338350 */
339- export const useListPets = (queryKey: reactQuery.QueryKey, variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn(queryKey ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
351+ export const useListPets = (variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn({ path: \\"/pets\\", operationId: \\"listPets\\", variables } ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
340352 ...options,
341353 ...queryOptions
342354 }); };
355+
356+ export type QueryOperation = {
357+ path: \\"/pets\\";
358+ operationId: \\"listPets\\";
359+ variables: ListPetsVariables;
360+ };
343361 "
344362 ` ) ;
345363 } ) ;
@@ -424,10 +442,16 @@ describe("generateReactQueryComponents", () => {
424442 /**
425443 * Get all the pets
426444 */
427- export const useListPets = (queryKey: reactQuery.QueryKey, variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn(queryKey ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
445+ export const useListPets = (variables: ListPetsVariables, options?: Omit<reactQuery.UseQueryOptions<ListPetsResponse, undefined, ListPetsResponse>, \\"queryKey\\" | \\"queryFn\\">) => { const { fetcherOptions, queryOptions, queryKeyFn } = usePetstoreContext(options); return reactQuery.useQuery<ListPetsResponse, undefined, ListPetsResponse>(queryKeyFn({ path: \\"/pets\\", operationId: \\"listPets\\", variables } ), () => fetchListPets({ ...fetcherOptions, ...variables }), {
428446 ...options,
429447 ...queryOptions
430448 }); };
449+
450+ export type QueryOperation = {
451+ path: \\"/pets\\";
452+ operationId: \\"listPets\\";
453+ variables: ListPetsVariables;
454+ };
431455 "
432456 ` ) ;
433457 } ) ;
@@ -548,6 +572,12 @@ describe("generateReactQueryComponents", () => {
548572 const { fetcherOptions } = usePetstoreContext();
549573 return reactQuery.useMutation<string, AddPetError, AddPetVariables>((variables: AddPetVariables) => fetchAddPet({ ...fetcherOptions, ...variables }), options);
550574 };
575+
576+ export type QueryOperation = {
577+ path: string;
578+ operationId: never;
579+ variables: unknown;
580+ };
551581 "
552582 ` ) ;
553583 } ) ;
@@ -669,6 +699,12 @@ describe("generateReactQueryComponents", () => {
669699 const { fetcherOptions } = usePetstoreContext();
670700 return reactQuery.useMutation<string, AddPetError, AddPetVariables>((variables: AddPetVariables) => fetchAddPet({ ...fetcherOptions, ...variables }), options);
671701 };
702+
703+ export type QueryOperation = {
704+ path: string;
705+ operationId: never;
706+ variables: unknown;
707+ };
672708 "
673709 ` ) ;
674710 } ) ;
@@ -790,6 +826,12 @@ describe("generateReactQueryComponents", () => {
790826 const { fetcherOptions } = usePetstoreContext();
791827 return reactQuery.useMutation<string, AddPetError, AddPetVariables>((variables: AddPetVariables) => fetchAddPet({ ...fetcherOptions, ...variables }), options);
792828 };
829+
830+ export type QueryOperation = {
831+ path: string;
832+ operationId: never;
833+ variables: unknown;
834+ };
793835 "
794836 ` ) ;
795837 } ) ;
@@ -890,6 +932,12 @@ describe("generateReactQueryComponents", () => {
890932 const { fetcherOptions } = usePetstoreContext();
891933 return reactQuery.useMutation<string, undefined, UpdatePetVariables>((variables: UpdatePetVariables) => fetchUpdatePet({ ...fetcherOptions, ...variables }), options);
892934 };
935+
936+ export type QueryOperation = {
937+ path: string;
938+ operationId: never;
939+ variables: unknown;
940+ };
893941 "
894942 ` ) ;
895943 } ) ;
0 commit comments