Skip to content

Commit

Permalink
chore: upgrade [email protected] (#3442)
Browse files Browse the repository at this point in the history
* chore: upgrade graphql-request

* chore: changeset
  • Loading branch information
danielbate authored Dec 3, 2024
1 parent 4131e74 commit 260274a
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 143 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-teachers-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": patch
---

chore: upgrade `[email protected]`
2 changes: 1 addition & 1 deletion packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@noble/curves": "^1.6.0",
"events": "^3.3.0",
"graphql": "^16.9.0",
"graphql-request": "5.0.0",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"ramda": "^0.30.1"
},
Expand Down
7 changes: 4 additions & 3 deletions packages/account/src/providers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { checkFuelCoreVersionCompatibility, versions } from '@fuel-ts/versions';
import { equalBytes } from '@noble/curves/abstract/utils';
import type { DocumentNode } from 'graphql';
import { GraphQLClient } from 'graphql-request';
import type { GraphQLResponse } from 'graphql-request/src/types';
import type { GraphQLClientResponse, GraphQLResponse } from 'graphql-request/src/types';
import gql from 'graphql-tag';
import { clone } from 'ramda';

Expand Down Expand Up @@ -674,8 +674,9 @@ Supported fuel-core version: ${supportedVersion}.`
private createOperations(): SdkOperations {
const fetchFn = Provider.getFetchFn(this.options);
const gqlClient = new GraphQLClient(this.urlWithoutAuth, {
fetch: (url: string, requestInit: RequestInit) => fetchFn(url, requestInit, this.options),
responseMiddleware: (response: GraphQLResponse<unknown> | Error) => {
fetch: (input: RequestInfo | URL, requestInit?: RequestInit) =>
fetchFn(input.toString(), requestInit || {}, this.options),
responseMiddleware: (response: GraphQLClientResponse<unknown> | Error) => {
if ('response' in response) {
const graphQlResponse = response.response as GraphQLResponse;

Expand Down
Loading

0 comments on commit 260274a

Please sign in to comment.