Skip to content

Commit

Permalink
improve: remove needless deep imports into graphql
Browse files Browse the repository at this point in the history
This makes the library better prepared for future versions of `graphql`
package.

See: graphql/graphql-js#4074
  • Loading branch information
jasonkuhrt committed May 9, 2024
1 parent 12cb8cf commit 11805c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/layers/5_client/client.returnMode.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable */
import { ExecutionResult } from 'graphql'
import { ObjMap } from 'graphql/jsutils/ObjMap.js'
import { type ObjMap } from 'graphql/jsutils/ObjMap.js'
import { describe } from 'node:test'
import { expectTypeOf, test } from 'vitest'
import { Graffle } from '../../../tests/_/schema/generated/__.js'
Expand Down
6 changes: 3 additions & 3 deletions src/legacy/helpers/analyzeDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import type { RequestDocument } from './types.js'
* instead of the entire package (greater than 500KiB) where tree-shaking is not supported.
* @see https://github.com/jasonkuhrt/graphql-request/pull/543
*/
import { type DocumentNode, OperationTypeNode } from 'graphql/language/ast.js'
import { parse } from 'graphql/language/parser.js'
import { print } from 'graphql/language/printer.js'
import { type DocumentNode, OperationTypeNode } from 'graphql'
import { parse } from 'graphql'
import { print } from 'graphql'

/**
* helpers
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/helpers/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
import type { GraphQLError } from 'graphql/error/GraphQLError.js'
import type { DocumentNode } from 'graphql/language/ast.js'
import type { GraphQLError } from 'graphql'
import type { DocumentNode } from 'graphql'
import type { MaybeLazy, MaybePromise, RemoveIndex } from '../../lib/prelude.js'
import type { ClientError } from '../classes/ClientError.js'

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/lib/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isPlainObject } from '../../lib/prelude.js'
* instead of the entire package (greater than 500KiB) where tree-shaking is not supported.
* @see https://github.com/jasonkuhrt/graphql-request/pull/543
*/
import type { OperationDefinitionNode } from 'graphql/language/ast.js'
import type { OperationDefinitionNode } from 'graphql'

/**
* Clean a GraphQL document to send it via a GET query
Expand Down
2 changes: 1 addition & 1 deletion src/lib/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
isListType,
isNonNullType,
} from 'graphql'
import type { ObjMap } from 'graphql/jsutils/ObjMap.js'
import type { ObjMap } from 'graphql'
import type { Errors } from './errors/__.js'

export type TypeMapByKind =
Expand Down

0 comments on commit 11805c8

Please sign in to comment.