-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align codegen and language server inline fragment __typename use
The `withTypenameFieldAddedWhereNeeded` utility in `apollo-language-server` was updated in #1286 to make sure `__typename`'s are added to inline fragments, when used by commands like `client:push`. The `apollo-codegen-core` package currently uses its own copy of `withTypenameFieldAddedWhereNeeded` however, which was not updated. This means that operations can be registered (in Apollo's operation registry) via `client:push` that don't line up with the operations output by codegen. This commit adjusts the `apollo-codegen-core` package to use the same `withTypenameFieldAddedWhereNeeded` function as `apollo-language-server` (which is already a dependency of codegen), to make sure the operations output from codegen line up with the operations pushed via `client:push`.
- Loading branch information
Showing
8 changed files
with
53 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
packages/apollo-codegen-core/src/utilities/__tests__/graphql.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./debouncer"; | ||
export * from "./uri"; | ||
export { Debug } from "./debug"; | ||
export { withTypenameFieldAddedWhereNeeded } from "./graphql"; |