Skip to content

Commit

Permalink
Stop installing polyfills by dropping transitive apollo-env dep(#5244)
Browse files Browse the repository at this point in the history
This `@apollographql/apollo-tooling` upgrade pulls in
apollographql/apollo-tooling#2339 which removes
our only dependency on the polyfill package `apollo-env`.

Fixes #2634.
  • Loading branch information
glasser authored May 26, 2021
1 parent 80006d1 commit c2ca923
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 54 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ The version headers in this history reflect the versions of Apollo Server itself
- `apollo-datasource-rest`: If another `Content-type` is already set on the response, don't overwrite it with `application/json`, allowing the user's initial `Content-type` to prevail. [PR #2520](https://github.com/apollographql/apollo-server/issues/2035)
- Don't add `cacheControl` directive if one has already been defined. [PR #2428](https://github.com/apollographql/apollo-server/pull/2428)
- `apollo-cache-control`: Do not respond with `Cache-control` headers if the HTTP response contains `errors`. [PR #2715](https://github.com/apollographql/apollo-server/pull/2715)
- `apollo-server-core`: Skip loading `util.promisify` polyfill in Node.js engines >= 8.0 [PR #2278](https://github.com/apollographql/apollo-server/pull/2278)
- `apollo-server-core`: Skip loading `util.promisify`, `Array.flat`, `Array.flatMap`, and `Object.fromEntries` polyfills, none of which are needed in Node 12+. [PR #2278](https://github.com/apollographql/apollo-server/pull/2278) [PR #5244](https://github.com/apollographql/apollo-server/pull/5244)
- `apollo-server-core`: Lazy load `subscriptions-transport-ws` in core [PR #2278](https://github.com/apollographql/apollo-server/pull/2278)
- `apollo-server-cache-redis`: **BREAKING FOR USERS OF `apollo-server-cache-redis`** (This is a package that must be updated separately but shares the same `CHANGELOG.md` with Apollo Server itself.) A new **major** version of this package has been published and updated to support Redis Standalone, Cluster and Sentinel modes. This is a breaking change since it is now based on [`ioredis`](https://github.com/luin/ioredis) instead of [`node_redis`](https://github.com/NodeRedis/node_redis). Although this update is compatible with the most common uses of `apollo-server-cache-redis`, please check the [options supported by `ioredis`](https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options) while updating to this version. The constructor options are passed directly from `RedisCache` to the new Redis adapter. The pre-1.0 versions should continue to work with Apollo Server without modification. [PR #1770](https://github.com/apollographql/apollo-server/pull/1770)
Expand Down
83 changes: 35 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"npm": "7.x"
},
"dependencies": {
"@apollographql/apollo-tools": "0.5.0",
"@apollographql/apollo-tools": "0.5.1",
"apollo-datasource": "file:packages/apollo-datasource",
"apollo-datasource-rest": "file:packages/apollo-datasource-rest",
"apollo-reporting-protobuf": "file:packages/apollo-reporting-protobuf",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"node": ">=12.0"
},
"dependencies": {
"@apollographql/apollo-tools": "^0.5.0",
"@apollographql/apollo-tools": "^0.5.1",
"@apollographql/graphql-playground-html": "1.6.29",
"@graphql-tools/mock": "^8.1.2",
"@graphql-tools/schema": "^7.1.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-server-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import type {
} from './graphqlOptions';
import type { ApolloServerPlugin } from 'apollo-server-plugin-base';

import { GraphQLSchemaModule } from '@apollographql/apollo-tools';
export { GraphQLSchemaModule };
import type { GraphQLSchemaModule } from '@apollographql/apollo-tools';
export type { GraphQLSchemaModule };

export { KeyValueCache } from 'apollo-server-caching';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { defaultFieldResolver } from "graphql/execution";
import { FieldNode } from "graphql/language";
import { GraphQLRequestExecutionListener } from "apollo-server-plugin-base";
import { GraphQLObjectResolver } from "@apollographql/apollo-tools";
import type { GraphQLObjectResolver } from "@apollographql/apollo-tools";

export const symbolExecutionDispatcherWillResolveField =
Symbol("apolloServerExecutionDispatcherWillResolveField");
Expand Down

0 comments on commit c2ca923

Please sign in to comment.