Skip to content

Commit

Permalink
fix: added TData to client execute variants closes #128
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Jun 29, 2021
1 parent 99029e2 commit 80426e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/villus/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ export class Client {
public async executeQuery<TData = any, TVars = QueryVariables>(
operation: OperationWithCachePolicy<TData, TVars>,
queryContext?: QueryExecutionContext
): Promise<OperationResult> {
): Promise<OperationResult<TData>> {
return this.execute<TData, TVars>(operation, 'query', queryContext);
}

public async executeMutation<TData = any, TVars = QueryVariables>(
operation: Operation<TData, TVars>,
queryContext?: QueryExecutionContext
): Promise<OperationResult> {
): Promise<OperationResult<TData>> {
return this.execute<TData, TVars>(operation, 'mutation', queryContext);
}

Expand Down

0 comments on commit 80426e2

Please sign in to comment.