Skip to content

Commit

Permalink
fix(): fix incompatibility with apollo/subgraph@0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 24, 2021
1 parent 41c421e commit 60ee0d0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/graphql-schema.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ export class GraphQLSchemaBuilder {
}

private loadFederationDirectives() {
const { federationDirectives } = loadPackage(
'@apollo/subgraph/dist/directives',
'SchemaBuilder',
() => require('@apollo/subgraph/dist/directives'),
);
return federationDirectives;
const { federationDirectives, directivesWithNoDefinitionNeeded } =
loadPackage('@apollo/subgraph/dist/directives', 'SchemaBuilder', () =>
require('@apollo/subgraph/dist/directives'),
);
return federationDirectives ?? directivesWithNoDefinitionNeeded;
}
}

0 comments on commit 60ee0d0

Please sign in to comment.