Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #216 from apollographql/deprecation-warning
Browse files Browse the repository at this point in the history
release 0.8
  • Loading branch information
Urigo authored Jul 7, 2017
2 parents a3397e8 + 9b1c8f2 commit 6c38d87
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Changelog

### vNEXT

### 0.8.0
- Expose opId `onOperationComplete` method [PR #211](https://github.com/apollographql/subscriptions-transport-ws/pull/211)
- Fix to make library able to be installed from a branch [PR #208](https://github.com/apollographql/subscriptions-transport-ws/pull/208)
- Fix for non forced closes (now it wont send connection_terminate) [PR #197](https://github.com/apollographql/subscriptions-transport-ws/pull/197)
- A lot of connection's flow improvements (on connect, on disconnect and on reconnect) [PR #197](https://github.com/apollographql/subscriptions-transport-ws/pull/197)
- Require specific lodash/assign module instead of entire package, so memory impact is reduced [PR #196](https://github.com/apollographql/subscriptions-transport-ws/pull/196)
- docs(README): Fix onEvent(eventName, callback, thisContext) list of eventName [PR #205](https://github.com/apollographql/subscriptions-transport-ws/pull/205)


### 0.7.3
- Fix for first subscription is never unsubscribed [PR #179](https://github.com/apollographql/subscriptions-transport-ws/pull/179)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "subscriptions-transport-ws",
"version": "0.7.3",
"version": "0.8.0",
"description": "A websocket transport for GraphQL subscriptions",
"main": "dist/index.js",
"browser": "dist/client.js",
Expand Down
5 changes: 3 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import assign = require('lodash.assign');
// We will move this into a new package in the future
export function addGraphQLSubscriptions(networkInterface: any, wsClient: SubscriptionClient): any {
if (process && process.env && process.env.NODE_ENV !== 'production') {
console.warn('This method becomes deprecated in the new package graphql-transport-ws. Start using the ' +
'GraphQLTransportWSClient to make queries, mutations and subscriptions over websockets.');
console.warn('Notice that addGraphQLSubscriptions method will become deprecated in the new package ' +
'graphql-transport-ws that will be released soon. Keep track for the new hybrid network release here: ' +
'https://github.com/apollographql/subscriptions-transport-ws/issues/169');
}

return assign(networkInterface, {
Expand Down
5 changes: 3 additions & 2 deletions src/test/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1956,8 +1956,9 @@ describe('Helpers', function () {

addGraphQLSubscriptions(mockNetworkInterface, mockedSubscriptionClient);

assert(consoleStub.calledWith('This method becomes deprecated in the new package graphql-transport-ws. ' +
'Start using the GraphQLTransportWSClient to make queries, mutations and subscriptions over websockets.'));
assert(consoleStub.calledWith('Notice that addGraphQLSubscriptions method will become deprecated in the new package ' +
'graphql-transport-ws that will be released soon. Keep track for the new hybrid network release here: ' +
'https://github.com/apollographql/subscriptions-transport-ws/issues/169'));
consoleStub.restore();
done();
});
Expand Down

0 comments on commit 6c38d87

Please sign in to comment.