Skip to content

Commit

Permalink
Fixup incorrect import
Browse files Browse the repository at this point in the history
The `DataRewrite.ts` file was mistakenly importing the wrong `assert`
method: it was importing the one from `console`, when it was meant to
import the one from `@apollo/federation-internals` (as used everywhere
else). This commit fixes that issue.
  • Loading branch information
Sylvain Lebresne committed May 16, 2023
1 parent 1ffb3dd commit f9d612f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/fifty-snakes-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@apollo/gateway": patch
---

Fix incorrect import the `assert` function in the `DataRewrite.ts`. The incorrect method was imported (due to a bad
import auto-completion) and went unnoticed, leading to potential build issue.

2 changes: 1 addition & 1 deletion gateway-js/src/dataRewrites.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FetchDataRewrite } from "@apollo/query-planner";
import { assert } from "console";
import { assert } from "@apollo/federation-internals";
import { GraphQLSchema, isAbstractType, isInterfaceType, isObjectType } from "graphql";

const FRAGMENT_PREFIX = '... on ';
Expand Down

0 comments on commit f9d612f

Please sign in to comment.