Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1075 from Shopify/ml-update-response-with-type
Browse files Browse the repository at this point in the history
[GraphQL Client] Update ResponseWithType to extend from Response
  • Loading branch information
melissaluu authored Nov 29, 2023
2 parents b3a62d9 + 82ee942 commit 9171fdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-pens-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopify/graphql-client": patch
---

Update `ResponseWithType` type to extend from the `Response` type
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { GraphQLClient } from "../graphql-client/types";

export type InputMaybe<_R = never> = never;

export interface AllOperations {
Expand Down Expand Up @@ -27,7 +25,7 @@ export type OperationVariables<
};
};

export type ResponseWithType<T = any> = Omit<GraphQLClient["fetch"], "json"> & {
export type ResponseWithType<T = any> = Response & {
json: () => Promise<T>;
};

Expand Down

0 comments on commit 9171fdd

Please sign in to comment.