apollo-server
apollo-server copied to clipboard
Try to break the dependency from `@apollo/gateway` on Apollo Server
This dependency is a pain because it makes it hard to test prerelease of Apollo Server.
This will include:
- [x] Seeing if we can get rid of the
Loggertype (#6056) - [ ] Considering keeping/moving the types required at build time to create plugins (and the "gateway" pseudo-plugin) out of
@apollo/server(see #6041) - [ ] Finding an alternative to the errors exported from
apollo-server-error(see also #6053) - [x] Better place to get
createSHAfrom than deep insideapollo-server-core(presumably apollo-utils) - [x] Changing the dependency on
apollo-reporting-protobufto a new name like@apollo/usage-reporting-protobuf
Also these things that are dependencies of packages we are removing but that don't themselves depend on apollo-server-core
- [x] Getting rid of
apollo-server-env(see #6046) - [x] Getting rid of
apollo-server-caching(see #6045)
Another thing to keep in mind: Gateway's API (specifically the GraphQLDataSource.process function) contains the ability to read from GraphQLRequestContext, but this type is changing in AS4 (if nothing else, the type of its cache field is changing). So we may have to do something fancy in order to have a single @apollo/gateway package version that works with both AS3 and AS4; eg, you might need a separate ApolloGatewayForAS4 (or import { ApolloGateway } from '@apollo/gateway/as4' or something). (Or to do a major version bump on @apollo/gateway and have to maintain two branches in parallel, but we probably don't like that for various reasons, including the desire to keep Gateway and composition major versions in sync with each other.)
Note that there is related work happening in https://github.com/apollographql/apollo-server/issues/6719.
This is done!