Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safely require cleanDocument/toSimpleDocument in graphql-mini-trannsf…
…orms The "jest" and "jest-simple" transforms for graphql-mini-transforms use __dirname in order to retrieve the absolute path to the relative file "document.js" when loading the cleanDocument and toSimpleDocument utilities. As a result, when the path to these files changes, such as when the package is updated under a manager like pnpm, the directory path will be different but the cache key will not change, causing it to try and use the Jest cached version of these files Since both cleanDocument and toSimpleDocument are exported at the top-level, we should just reference the `graphql-mini-transforms` package directly in the require statement.
- Loading branch information