diff --git a/.changeset/strange-dingos-confess.md b/.changeset/strange-dingos-confess.md new file mode 100644 index 0000000000..d6d778d4f8 --- /dev/null +++ b/.changeset/strange-dingos-confess.md @@ -0,0 +1,5 @@ +--- +'graphql-tool-utilities': patch +--- + +Fix import of apollo-codegen-core when using the mjs version of the package diff --git a/packages/graphql-tool-utilities/src/ast.ts b/packages/graphql-tool-utilities/src/ast.ts index fa216f081d..d4d374b412 100644 --- a/packages/graphql-tool-utilities/src/ast.ts +++ b/packages/graphql-tool-utilities/src/ast.ts @@ -8,7 +8,8 @@ import type { LegacyInlineFragment, LegacyOperation, } from 'apollo-codegen-core/lib/compiler/legacyIR'; -import {compileToLegacyIR as compileToIR} from 'apollo-codegen-core/lib/compiler/legacyIR'; +// Explicit js extension as it is required for the esm build +import {compileToLegacyIR as compileToIR} from 'apollo-codegen-core/lib/compiler/legacyIR.js'; export enum OperationType { Query = 'query',