Skip to content
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

Backport #2037: @apollo/subgraph: remove dependency on apollo-server-types #2039

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

glasser
Copy link
Member

@glasser glasser commented Aug 4, 2022

(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

…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
@netlify
Copy link

netlify bot commented Aug 4, 2022

Deploy Preview for apollo-federation-docs ready!

Name Link
🔨 Latest commit 834fe69
🔍 Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/62ec307c9c97390008734aee
😎 Deploy Preview https://deploy-preview-2039--apollo-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 4, 2022

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.

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 glasser requested a review from benweatherman August 4, 2022 20:50
Copy link
Contributor

@benweatherman benweatherman left a 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
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 glasser merged commit d988a4c into version-0.x Aug 4, 2022
@glasser glasser deleted the glasser/backport-2037 branch August 4, 2022 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants