-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V0: Change dependency on Apollo Server 3 to new type package
Backport of #2044. This removes the last dependency on Apollo Server from Apollo Gateway. Part of apollographql/apollo-server#6057 and apollographql/apollo-server#6719 The new package `@apollo/server-gateway-interface` (in the apollo-utils repo for now, though it should move to the apollo-server repo once AS4 is fully released) defines types that are pretty close to compatible with the AS3 types previously used here, but don't require a dependency on the entirety of AS3. This new package will be used by AS4 and AS4 will convert its data into the format described by these types. This change is entirely a build-time change (other than a slight change to how a enum is referenced). So the worst case scenario if this differs unintentionally from the original AS3 definitions is that users can apply a bit of `as any` to fix it. Note that we've removed some `<TContext>` from types that it turned out were only ever instantiated with `Record<string, any>` anyway. They are left in in RemoteGraphQLDataSource because users making their own data sources can explicitly specify their context type. The types in `@apollo/server-gateway-interface` are pretty close to the AS3 types (with different names) but there are some slight differences. The cache scope enum is replaced with `any`, as enums are not structurally typed and it is otherwise difficult to type them. `GatewayInterface` now expects `onSchemaLoadOrUpdate` to exist and doesn't mention the old `onSchemaChange`. For now, we leave `apollo-reporting-protobuf` alone, so we don't have a direct dependency on a prerelease.
- Loading branch information
Showing
14 changed files
with
248 additions
and
110 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
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
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
Oops, something went wrong.