@graphql-tools/jest-transform
3.1.0
Minor Changes
-
#8605
ea2603aThanks @ardatan ! -@graphql-tools/webpack-loader(and@graphql-tools/jest-transform, which calls it) now accepts more than one GraphQL operation in the same file and exports each named operation, matchinggraphql-tag/loader.A file with two mutations used to throw
GraphQL Webpack Loader allows only for one GraphQL Operation per file, so this import failed in webpack and Jest:# menuMutations.graphql mutation deleteMenuMutation { deleteMenu { ...MenuFields } } mutation upsertMenuMutation { upsertMenu { id } } fragment MenuFields on Menu { id name }import { deleteMenuMutation, upsertMenuMutation } from './menuMutations.graphql'The default export is still the whole document. Each named export is that operation plus the fragments it uses.
deleteMenuMutationincludesMenuFields;upsertMenuMutationdoes not.import menuMutations, { deleteMenuMutation, upsertMenuMutation, } from './menuMutations.graphql'A single named operation is also exported under its name. Unnamed operations are still allowed when the file has only one operation. If the file has more than one operation, each operation must be named.
jest-transformnow passes the Jest source path and filesystem into the loader, soesModule: truecan emit named exports for operations and fragments pulled in with#import. CommonJS named exports use an own property so a GraphQL name of__proto__does not replace the export object’s prototype.
Patch Changes
- Updated dependencies [
ea2603a]:- @graphql-tools/webpack-loader@8.1.0
3.0.1
Patch Changes
- Updated dependencies [
8bbb097]:- @graphql-tools/webpack-loader@8.0.1
3.0.0
Major Changes
-
#8515
1d70c62Thanks @ardatan ! - Drop GraphQL v14/v15 support and require Node.js >= 22.18.graphqlpeer range is now^16.0.0 || ^17.0.0.engines.nodeis now>=22.18.0(Nodefs.glob+ Babel 8).- Dev tooling and
@graphql-tools/graphql-tag-pluckmove to Babel 8 (@babel/core/ parser / traverse / types). - The standalone
cross-inspectpackage is discontinued. Useinspectfrom@graphql-tools/utilsinstead (Nodeutil.inspectviaprocess.getBuiltinModule, with a smallJSON.stringify/Stringfallback).
Removed
@graphql-tools/utilsexportsRemoved Use instead getArgumentValuesimport { getArgumentValues } from 'graphql'coerceInputs/graphqlJSCompatgraphql@16+ APIs ( getArgumentValues, etc.)createDeferred/createDeferredPromiseconst { promise, resolve, reject } = Promise.withResolvers()createGraphQLErrornew GraphQLError(message, options)fromgraphqlmapMaybePromisehandleMaybePromisefrom@whatwg-node/promise-helpersisPromise/fakePromise/mapAsyncIterator/MaybePromise@whatwg-node/promise-helpersregisterAbortSignalListener/getAbortPromiseAbortSignalAPIs (throwIfAborted,addEventListener('abort', …, { once: true }),AbortSignal.any, …)withCancel/getAsyncIterableWithCancel/getAsyncIteratorWithCancelHandle cancellation on the async iterator’s return()(or your transport abort path)debugTimerStart/debugTimerEndYour own timing / console.timeif neededPromiseWithResolvers(type)Built-in PromiseWithResolvers<T>/ return type ofPromise.withResolvers()inspectand the WeakMapmemoize1…memoize2of5helpers remain on@graphql-tools/utils(inspect is no longer re-exported fromcross-inspect).File matching (
globby→fs.glob)Loaders and
@graphql-tools/load-filesnow use Node’sfs.globthrough:import { matchFiles, matchFilesSync } from '@graphql-tools/load-files';Directory symlinks are followed for recursive (
**) patterns:- On Node.js ≥26.1 (and ≥24.16 where backported),
fs.globfollowSymlinksis used. - On older engines, symlink directories are discovered only under each pattern’s literal prefix (not the whole
cwd) and patterns are re-rooted. - Non-recursive / literal patterns skip the symlink walk entirely.
@graphql-tools/executorhot-path caches (collectSubfields, argument coercion,@streamdetection) usememoize2/memoize3from utils.collectSubFieldsin utils stays unmemoized so the executor can own a single memoize3 layer.Errors and other cleanup
- Prefer
new GraphQLError(message, options)fromgraphql. Experimental schemacoordinatesupport remains onlocatedError/relocatedError/getSchemaCoordinate. - Removed GraphQL versions older than 16 compatibility branches (error construction, validation rule name suffixes,
URL.canParsefallback). - Promise helpers should be imported from
@whatwg-node/promise-helpers(handleMaybePromise,isPromise,fakePromise,mapAsyncIterator,MaybePromise) rather than re-exported from utils.
Patch Changes
- #8515
1d70c62Thanks @ardatan ! - dependencies updates:- Updated dependency
graphql@^16.0.0 || ^17.0.0↗︎ (from^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0, inpeerDependencies)
- Updated dependency
- Updated dependencies [
1d70c62,1d70c62]:- @graphql-tools/webpack-loader@8.0.0
2.0.2
Patch Changes
- Updated dependencies [
04e8159]:- @graphql-tools/webpack-loader@7.0.1
2.0.1
Patch Changes
-
#7243
7dcd7a2Thanks @renovate ! - dependencies updates:- Updated dependency
@jest/transform@^30.0.0↗︎ (from^29.0.0, independencies) - Updated dependency
@jest/types@^30.0.0↗︎ (from^29.0.0, independencies)
- Updated dependency
-
#7246
76aa1b1Thanks @renovate ! - dependencies updates:- Updated dependency
@jest/transform@^30.0.0↗︎ (from^29.0.0, independencies) - Updated dependency
@jest/types@^30.0.0↗︎ (from^29.0.0, independencies)
- Updated dependency
2.0.0
Major Changes
Patch Changes
- Updated dependencies
[
944a68e8]:- @graphql-tools/webpack-loader@7.0.0
1.2.3
Patch Changes
- Updated dependencies []:
- @graphql-tools/webpack-loader@6.7.2
1.2.2
Patch Changes
- #4671
96c9e4dfThanks @renovate ! - dependencies updates:- Updated dependency
@jest/transform@^29.0.0↗︎ (from^28.0.0, independencies) - Updated dependency
@jest/types@^29.0.0↗︎ (from^28.0.0, independencies)
- Updated dependency
1.2.1
Patch Changes
-
#4624
e3167edcThanks @n1ru4l ! - Fix CommonJS TypeScript resolution withmoduleResolutionnode16ornodenext -
Updated dependencies [
e3167edc]:- @graphql-tools/webpack-loader@6.7.1
1.2.0
Minor Changes
- d76a299c: Support TypeScript module resolution.
Patch Changes
- Updated dependencies [d76a299c]
- @graphql-tools/webpack-loader@6.7.0
1.1.5
Patch Changes
- 041c5ba1: Use caret range for the tslib dependency
- Updated dependencies [041c5ba1]
- @graphql-tools/webpack-loader@6.6.3
1.1.4
Patch Changes
- bf89eae0: fix(jest-transform): add default export for Jest 28 support
1.1.3
Patch Changes
- fc7fe4a4: Jest 18 support
1.1.2
Patch Changes
- 0c0c6857: fix - align versions
- Updated dependencies [0c0c6857]
- @graphql-tools/webpack-loader@6.6.2
1.1.1
Patch Changes
- 4bfb3428: enhance: use ^ for tslib dependency
- Updated dependencies [4bfb3428]
- @graphql-tools/webpack-loader@6.6.1
1.1.0
Minor Changes
- c5b0719c: feat: GraphQL v16 support
Patch Changes
- Updated dependencies [c5b0719c]
- @graphql-tools/webpack-loader@6.6.0
1.0.0
Major Changes
- 5a4d198b: new jest transform
Patch Changes
- Updated dependencies [5a4d198b]
- @graphql-tools/webpack-loader@6.5.0