Skip to content

Commit 1c1898b

Browse files
committed
fix: apollo subgraph version import
1 parent df1f85e commit 1c1898b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/graphql/lib/federation/graphql-federation.factory.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ export class GraphQLFederationFactory {
9494
'ApolloFederation',
9595
() => require('@apollo/subgraph'),
9696
);
97-
const apolloSubgraphVersion = loadPackage(
98-
'@apollo/subgraph',
99-
'ApolloFederation',
100-
() => require('@apollo/subgraph/package.json'),
101-
);
97+
const apolloSubgraphVersion = (
98+
await import('@apollo/subgraph/package.json')
99+
).version;
102100

103101
const isaApolloSubgraph2 = Number(apolloSubgraphVersion.split('.')[0]) >= 2;
104102
const printSubgraphSchema = apolloSubgraph.printSubgraphSchema;

0 commit comments

Comments
 (0)