We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d2569a commit e5c8e7fCopy full SHA for e5c8e7f
src/resolveRequestDocument.ts
@@ -1,6 +1,12 @@
1
import type { RequestDocument } from './types.js'
2
-import type { DocumentNode, OperationDefinitionNode } from 'graphql'
3
-import { parse, print } from 'graphql'
+/**
+ * Refactored imports from `graphql` to be more specific, this helps import only the required files (100KiB)
4
+ * instead of the entire package (>500KiB) where tree-shaking is not supported.
5
+ * @see https://github.com/jasonkuhrt/graphql-request/pull/543
6
+ */
7
+import type { DocumentNode, OperationDefinitionNode } from 'graphql/language/ast.js'
8
+import { parse } from 'graphql/language/parser.js'
9
+import { print } from 'graphql/language/printer.js'
10
11
/**
12
* helpers
0 commit comments