Skip to content

Commit 11805c8

Browse files
committed
improve: remove needless deep imports into graphql
This makes the library better prepared for future versions of `graphql` package. See: graphql/graphql-js#4074
1 parent 12cb8cf commit 11805c8

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/layers/5_client/client.returnMode.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable */
22
import { ExecutionResult } from 'graphql'
3-
import { ObjMap } from 'graphql/jsutils/ObjMap.js'
3+
import { type ObjMap } from 'graphql/jsutils/ObjMap.js'
44
import { describe } from 'node:test'
55
import { expectTypeOf, test } from 'vitest'
66
import { Graffle } from '../../../tests/_/schema/generated/__.js'

src/legacy/helpers/analyzeDocument.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import type { RequestDocument } from './types.js'
66
* instead of the entire package (greater than 500KiB) where tree-shaking is not supported.
77
* @see https://github.com/jasonkuhrt/graphql-request/pull/543
88
*/
9-
import { type DocumentNode, OperationTypeNode } from 'graphql/language/ast.js'
10-
import { parse } from 'graphql/language/parser.js'
11-
import { print } from 'graphql/language/printer.js'
9+
import { type DocumentNode, OperationTypeNode } from 'graphql'
10+
import { parse } from 'graphql'
11+
import { print } from 'graphql'
1212

1313
/**
1414
* helpers

src/legacy/helpers/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
2-
import type { GraphQLError } from 'graphql/error/GraphQLError.js'
3-
import type { DocumentNode } from 'graphql/language/ast.js'
2+
import type { GraphQLError } from 'graphql'
3+
import type { DocumentNode } from 'graphql'
44
import type { MaybeLazy, MaybePromise, RemoveIndex } from '../../lib/prelude.js'
55
import type { ClientError } from '../classes/ClientError.js'
66

src/legacy/lib/graphql.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isPlainObject } from '../../lib/prelude.js'
66
* instead of the entire package (greater than 500KiB) where tree-shaking is not supported.
77
* @see https://github.com/jasonkuhrt/graphql-request/pull/543
88
*/
9-
import type { OperationDefinitionNode } from 'graphql/language/ast.js'
9+
import type { OperationDefinitionNode } from 'graphql'
1010

1111
/**
1212
* Clean a GraphQL document to send it via a GET query

src/lib/graphql.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
isListType,
1212
isNonNullType,
1313
} from 'graphql'
14-
import type { ObjMap } from 'graphql/jsutils/ObjMap.js'
14+
import type { ObjMap } from 'graphql'
1515
import type { Errors } from './errors/__.js'
1616

1717
export type TypeMapByKind =

0 commit comments

Comments
 (0)