Skip to content

Commit 58f7741

Browse files
committed
fix: remove spaces in fetcher template
1 parent e34e9bd commit 58f7741

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

plugins/typescript/src/generators/generateReactQueryComponents.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,12 @@ describe("generateReactQueryComponents", () => {
10381038
const { fetcherOptions } = useContext();
10391039
return reactQuery.useMutation<string, undefined, UpdatePetVariables>((variables: UpdatePetVariables) => fetchUpdatePet({ ...fetcherOptions, ...variables }), options);
10401040
};
1041+
1042+
export type QueryOperation = {
1043+
path: string;
1044+
operationId: never;
1045+
variables: unknown;
1046+
};
10411047
"
10421048
`);
10431049
});

plugins/typescript/src/templates/fetcher.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ export async function ${camel(prefix)}Fetch<
6565
TQueryParams,
6666
TPathParams
6767
>): Promise<TData> {
68-
const response = await window.fetch(\`\${baseUrl}
69-
\${resolveUrl(url, queryParams, pathParams)}\`,
68+
const response = await window.fetch(\`\${baseUrl}\${resolveUrl(url, queryParams, pathParams)}\`,
7069
{
7170
method: method.toUpperCase(),
7271
body: body ? JSON.stringify(body) : undefined,

0 commit comments

Comments
 (0)