Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
neil585456525 committed Oct 12, 2023
1 parent 18f5d32 commit 39530e5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class CustomMapperFetcher extends FetcherRenderer {
return `${this._mapper.type}<${operationResultType}, ${operationVariablesTypes}>`;
}

generateFetcherImplementaion(): string {
generateFetcherImplementation(): string {
if (this._mapper.isExternal) {
return buildMapperImport(
this._mapper.source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class HardcodedFetchFetcher extends FetcherRenderer {
return ` method: "POST",${fetchParamsPartial}`;
}

generateFetcherImplementaion(): string {
generateFetcherImplementation(): string {
return `
function fetcher<TData, TVariables>(query: string, variables?: TVariables) {
return async (): Promise<TData> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FetchFetcher extends FetcherRenderer {
autoBind(this);
}

generateFetcherImplementaion(): string {
generateFetcherImplementation(): string {
return `
function fetcher<TData, TVariables>(endpoint: string, requestInit: RequestInit, query: string, variables?: TVariables) {
return async (): Promise<TData> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class GraphQLRequestClientFetcher extends FetcherRenderer {
autoBind(this);
}

generateFetcherImplementaion(): string {
generateFetcherImplementation(): string {
return this.clientPath
? `
function fetcher<TData, TVariables extends { [key: string]: any }>(query: string, variables?: TVariables, requestHeaders?: RequestInit['headers']) {
Expand Down
4 changes: 3 additions & 1 deletion packages/plugins/typescript/react-query/src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export class BaseFetcherRenderer {
autoBind(this);
}

generateQueryHelper() {}

generateQueryVariablesSignature(
hasRequiredVariables: boolean,
operationVariablesTypes: string,
Expand Down Expand Up @@ -142,7 +144,7 @@ export class BaseFetcherRenderer {
}
}
export abstract class FetcherRenderer extends BaseFetcherRenderer {
abstract generateFetcherImplementaion(): string;
abstract generateFetcherImplementation(): string;
abstract generateQueryHook(
node: OperationDefinitionNode,
documentVariableName: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/typescript/react-query/src/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class ReactQueryVisitor extends ClientSideBaseVisitor<
}

public getFetcherImplementation(): string {
return this.fetcher.generateFetcherImplementaion();
return this.fetcher.generateFetcherImplementation();
}

private _getHookSuffix(name: string, operationType: string) {
Expand Down

0 comments on commit 39530e5

Please sign in to comment.