Skip to content

Commit

Permalink
fix: Add ClientError to ResponseMiddleware param (#534)
Browse files Browse the repository at this point in the history
Co-authored-by: Rickvian Aldi <rickvian.aldi@ninjavan.co>
  • Loading branch information
rickvian and Rickvian Aldi authored May 29, 2023
1 parent 7e69742 commit c124ec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export interface BatchRequestsExtendedOptions<V extends Variables = Variables>
url: string
}

export type ResponseMiddleware = (response: GraphQLClientResponse<unknown> | Error) => void
export type ResponseMiddleware = (response: GraphQLClientResponse<unknown> | ClientError | Error) => void

// prettier-ignore
export type RequestMiddleware<V extends Variables = Variables> = (request: RequestExtendedInit<V>) => RequestExtendedInit | Promise<RequestExtendedInit>
Expand Down

0 comments on commit c124ec8

Please sign in to comment.