Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Use absolute import path when importing apollo-codegen legacyIR
Browse files Browse the repository at this point in the history
Fixes import error when using the mjs version of the
graphql-tool-utilities package with node
  • Loading branch information
BPScott committed Aug 27, 2024
1 parent 3fe224f commit 0d070ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-dingos-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'graphql-tool-utilities': patch
---

Fix import of apollo-codegen-core when using the mjs version of the package
3 changes: 2 additions & 1 deletion packages/graphql-tool-utilities/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0d070ba

Please sign in to comment.