Skip to content

Commit

Permalink
op-reg and response-cache: only export in one way (#5542)
Browse files Browse the repository at this point in the history
For some reason, these plugins defined their exports both using `export
default` and `module.exports =`. In practice this means that the latter
overrides the former or something, which in some contexts causes
problems (see #5526).
  • Loading branch information
glasser committed Jul 23, 2021
1 parent 207fae5 commit fbfba5a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The version headers in this history reflect the versions of Apollo Server itself
- `apollo-server-core`/`apollo-server-plugin-base`: Add support for `schemaDidLoadOrUpdate` event hooks, to be specified by the `serverWillStart` event hook. Plugins listening for this event will receive the API schema (and core schema for gateways) when the server's schema is initially loaded and when the server's schema is updated. For more information about this plugin event, see [the plugin event reference documentation](https://www.apollographql.com/docs/apollo-server/integrations/plugins-event-reference/). [PR #5187](https://github.com/apollographql/apollo-server/pull/5187)
- `apollo-server-core`: Add support for schema reporting when using Apollo Gateway. At the time of this package's release, Apollo Studio does not yet support schema reporting from gateways, so you should not use this feature yet for gateways (unless instructed otherwise by Apollo staff or by the Studio docs). If you do enable schema reporting for a gateway, the version of `@apollo/gateway` must be at least `0.35.0` , or else `start()` will error. [PR #5187](https://github.com/apollographql/apollo-server/pull/5187)
- `apollo-server-core`: Support gateways without executors, to help with mocking gateways. Note that if you have a custom `GatewayInterface` implementation, Apollo Server will now honor the `executor` returned from `load` and will ignore the `executor` method on the gateway itself. See the PR for details. [PR #5539](https://github.com/apollographql/apollo-server/pull/5539)
- `apollo-server-plugin-response-cache`, `apollo-server-plugin-operation-registry`: Change how the default export from the package is set up to fix errors with some build tools. [PR #5542](https://github.com/apollographql/apollo-server/pull/5542)

## v3.0.2

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import plugin from './ApolloServerPluginOperationRegistry';
export default plugin;
module.exports = plugin;
1 change: 0 additions & 1 deletion packages/apollo-server-plugin-response-cache/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import plugin from './ApolloServerPluginResponseCache';
export default plugin;
module.exports = plugin;

0 comments on commit fbfba5a

Please sign in to comment.