Skip to content

Commit

Permalink
feat(rest-datasource): support redis cluster and sentinel (#1770)
Browse files Browse the repository at this point in the history
* feat(rest-datasource): add redis cluster and sentinel support

* feat(rest-datasource): update apollo-server-cache-redis to support cluster mode

* Bump minimum `engine` to Node.js 8.  Node.js 6 is now deprecated.

We're doing a major version bump here, so I'm going to take the opportunity
to "drop" Node.js 6 support.  Granted, this `engines` field is only a
suggestion that is loosely enforced by some tools (and not obeyed by Node.js
or npm), it's the spirit of the thought that counts, I think? :)

* Bump major portion of `apollo-server-cache-redis` version.

* Update changelog to reflect breaking changes instructions
  • Loading branch information
eberhara authored and abernix committed May 24, 2019
1 parent 06ff964 commit 7667cd4
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 113 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- core: Expose SHA-256 hex hash digest of the Engine API key to plugins, when available, as `engine.apiKeyHash`. [PR# 2685](https://github.com/apollographql/apollo-server/pull/2685)
- `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)
- `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-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)

### v2.5.0

Expand Down
2 changes: 1 addition & 1 deletion docs/source/features/data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ const server = new ApolloServer({
});
```
For documentation of the options you can pass to the underlying Redis client, look [here](https://github.com/NodeRedis/node_redis).
For documentation of the options you can pass to the underlying Redis client, look [here](https://github.com/luin/ioredis).
## Implementing your own cache backend
Expand Down
Loading

0 comments on commit 7667cd4

Please sign in to comment.