-
Notifications
You must be signed in to change notification settings - Fork 259
@apollo/subgraph: remove dependency on apollo-server-types #2037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
apollo-server-types is an Apollo Server 3 package that is going away in Apollo Server 4, so we don't want `@apollo/subgraph` to depend on it. This was a build-time-only dependency (it just imported a type and that type isn't used in the generated .d.ts files) but it would still be helpful to minimize dependencies so that AS4 users don't also end up with pieces of AS3 installed. The new package `@apollo/cache-control-types` also has a function that implements the "does it look like it's the right cacheControl object?" itself, and it does not rely on AS3's `declare module` to globally monkeypatch `cacheControl` onto `GraphQLResolveInfo`'s type definition. Part of apollographql/apollo-server#6057
✅ Deploy Preview for apollo-federation-docs canceled.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
benweatherman
approved these changes
Aug 4, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐐
glasser
added a commit
that referenced
this pull request
Aug 4, 2022
…types (Note: as part of backporting, I put out another version @apollo/[email protected] with apollographql/apollo-utils#173 and will now forward-port the dependency update.) apollo-server-types is an Apollo Server 3 package that is going away in Apollo Server 4, so we don't want `@apollo/subgraph` to depend on it. This was a build-time-only dependency (it just imported a type and that type isn't used in the generated .d.ts files) but it would still be helpful to minimize dependencies so that AS4 users don't also end up with pieces of AS3 installed. The new package `@apollo/cache-control-types` also has a function that implements the "does it look like it's the right cacheControl object?" itself, and it does not rely on AS3's `declare module` to globally monkeypatch `cacheControl` onto `GraphQLResolveInfo`'s type definition. Part of apollographql/apollo-server#6057
glasser
added a commit
that referenced
this pull request
Aug 4, 2022
Turns out that if you have AS3 in your TS build (which version-0.x does), you need to be a bit more careful how you declare some things. This commit ensures that the extra care required for version-0.x doesn't break main.
glasser
added a commit
that referenced
this pull request
Aug 4, 2022
Turns out that if you have AS3 in your TS build (which version-0.x does), you need to be a bit more careful how you declare some things. This commit ensures that the extra care required for version-0.x doesn't break main.
glasser
added a commit
that referenced
this pull request
Aug 4, 2022
…types (#2039) (Note: as part of backporting, I put out another version @apollo/[email protected] with apollographql/apollo-utils#173 and will now forward-port the dependency update.) apollo-server-types is an Apollo Server 3 package that is going away in Apollo Server 4, so we don't want `@apollo/subgraph` to depend on it. This was a build-time-only dependency (it just imported a type and that type isn't used in the generated .d.ts files) but it would still be helpful to minimize dependencies so that AS4 users don't also end up with pieces of AS3 installed. The new package `@apollo/cache-control-types` also has a function that implements the "does it look like it's the right cacheControl object?" itself, and it does not rely on AS3's `declare module` to globally monkeypatch `cacheControl` onto `GraphQLResolveInfo`'s type definition. Part of apollographql/apollo-server#6057
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
apollo-server-types is an Apollo Server 3 package that is going away in
Apollo Server 4, so we don't want
@apollo/subgraph
to depend on it.This was a build-time-only dependency (it just imported a type and that
type isn't used in the generated .d.ts files) but it would still be
helpful to minimize dependencies so that AS4 users don't also end up
with pieces of AS3 installed.
The new package
@apollo/cache-control-types
also has a function thatimplements the "does it look like it's the right cacheControl object?"
itself, and it does not rely on AS3's
declare module
to globallymonkeypatch
cacheControl
ontoGraphQLResolveInfo
's type definition.Part of apollographql/apollo-server#6057