Skip to content

Commit b2c1181

Browse files
authored
Merge pull request #469 from anajavi/feat/graphql-subscriptions-v2
Support graphql-subscriptions v2
2 parents 0ab0137 + 85638b1 commit b2c1181

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"iterall": "^1.3.0"
4040
},
4141
"peerDependencies": {
42-
"graphql-subscriptions": "^1.0.0"
42+
"graphql-subscriptions": "^1.0.0 || ^2.0.0"
4343
},
4444
"devDependencies": {
4545
"@istanbuljs/nyc-config-typescript": "^1.0.1",
@@ -54,8 +54,8 @@
5454
"chai": "^4.2.0",
5555
"chai-as-promised": "^7.1.1",
5656
"eslint": "^7.7.0",
57-
"graphql": "^15.3.0",
58-
"graphql-subscriptions": "^1.1.0",
57+
"graphql": "^15.7.2",
58+
"graphql-subscriptions": "^2.0.0",
5959
"ioredis": "^4.17.3",
6060
"mocha": "^8.1.3",
6161
"nyc": "^15.1.0",

src/test/integration-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('PubSubAsyncIterator', function() {
8080
});
8181

8282
it('should allow subscriptions', () =>
83-
subscribe(schema, query)
83+
subscribe({ schema, document: query})
8484
.then(ai => {
8585
// tslint:disable-next-line:no-unused-expression
8686
expect(isAsyncIterable(ai)).to.be.true;
@@ -95,7 +95,7 @@ describe('PubSubAsyncIterator', function() {
9595
}));
9696

9797
it('should allow pattern subscriptions', () =>
98-
subscribe(schema, patternQuery)
98+
subscribe({ schema, document: patternQuery })
9999
.then(ai => {
100100
// tslint:disable-next-line:no-unused-expression
101101
expect(isAsyncIterable(ai)).to.be.true;
@@ -110,7 +110,7 @@ describe('PubSubAsyncIterator', function() {
110110
}));
111111

112112
it('should clear event handlers', () =>
113-
subscribe(schema, query)
113+
subscribe({ schema, document: query})
114114
.then(ai => {
115115
// tslint:disable-next-line:no-unused-expression
116116
expect(isAsyncIterable(ai)).to.be.true;

0 commit comments

Comments
 (0)