mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 10:50:06 +08:00
updated pubsub
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@
|
||||
"graphql": "^0.9.1",
|
||||
"graphql-docs": "^0.2.0",
|
||||
"graphql-errors": "^2.1.0",
|
||||
"graphql-redis-subscriptions": "^1.1.5",
|
||||
"graphql-redis-subscriptions": "^1.3.0",
|
||||
"graphql-server-express": "^0.6.0",
|
||||
"graphql-subscriptions": "^0.4.3",
|
||||
"graphql-tag": "^1.2.3",
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
const {RedisPubSub} = require('graphql-redis-subscriptions');
|
||||
const {connectionOptions, attachMonitors} = require('./redis');
|
||||
const {createClient} = require('./redis');
|
||||
|
||||
/**
|
||||
* getClient returns the pubsub singleton for this instance.
|
||||
@@ -10,11 +10,11 @@ const getClient = () => {
|
||||
return pubsub;
|
||||
}
|
||||
|
||||
pubsub = new RedisPubSub({connection: connectionOptions});
|
||||
|
||||
// Attach the node monitors to the subscriber + publishers.
|
||||
attachMonitors(pubsub.redisPublisher);
|
||||
attachMonitors(pubsub.redisSubscriber);
|
||||
// Create the new PubSub client, we only need one per instance of Talk.
|
||||
pubsub = new RedisPubSub({
|
||||
publisher: createClient(),
|
||||
subscriber: createClient(),
|
||||
});
|
||||
|
||||
return pubsub;
|
||||
};
|
||||
|
||||
@@ -74,8 +74,6 @@ const createClient = () => {
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
connectionOptions,
|
||||
attachMonitors,
|
||||
createClient,
|
||||
createClientFactory: () => {
|
||||
let client = null;
|
||||
|
||||
@@ -362,7 +362,7 @@ async@2.4.1:
|
||||
dependencies:
|
||||
lodash "^4.14.0"
|
||||
|
||||
async@^2.0.1, async@^2.1.2, async@^2.1.4:
|
||||
async@^2.1.2, async@^2.1.4:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d"
|
||||
dependencies:
|
||||
@@ -2492,7 +2492,7 @@ es6-promise@3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4"
|
||||
|
||||
es6-promise@^3.0.2, es6-promise@^3.2.1:
|
||||
es6-promise@^3.0.2:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
|
||||
|
||||
@@ -3336,13 +3336,14 @@ graphql-errors@^2.1.0:
|
||||
babel-runtime "^6.6.1"
|
||||
uuid "^2.0.2"
|
||||
|
||||
graphql-redis-subscriptions@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/graphql-redis-subscriptions/-/graphql-redis-subscriptions-1.1.5.tgz#69166bebd8d92243d6f8e80c97ebf4c588d80c8d"
|
||||
graphql-redis-subscriptions@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql-redis-subscriptions/-/graphql-redis-subscriptions-1.3.0.tgz#bbc52b0f77bf7d50945c6bf4e8b8aba5135555b4"
|
||||
dependencies:
|
||||
async "^2.0.1"
|
||||
graphql-subscriptions "^0.2.0"
|
||||
redis "^2.6.3"
|
||||
graphql-subscriptions "^0.4.2"
|
||||
iterall "^1.1.1"
|
||||
optionalDependencies:
|
||||
ioredis "^3.1.2"
|
||||
|
||||
graphql-server-core@^0.6.0:
|
||||
version "0.6.0"
|
||||
@@ -3364,11 +3365,13 @@ graphql-server-module-graphiql@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql-server-module-graphiql/-/graphql-server-module-graphiql-0.6.0.tgz#e37634b05f000731981e8ed13103f9a5861e5da0"
|
||||
|
||||
graphql-subscriptions@^0.2.0:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-0.2.3.tgz#75f9a02cb6d2b456b1703ce95670f793dacee607"
|
||||
graphql-subscriptions@^0.4.2:
|
||||
version "0.4.4"
|
||||
resolved "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-0.4.4.tgz#39cff32d08dd3c990113864bab77154403727e9b"
|
||||
dependencies:
|
||||
es6-promise "^3.2.1"
|
||||
"@types/graphql" "^0.9.1"
|
||||
es6-promise "^4.0.5"
|
||||
iterall "^1.1.1"
|
||||
|
||||
graphql-subscriptions@^0.4.3:
|
||||
version "0.4.3"
|
||||
@@ -3822,7 +3825,7 @@ invert-kv@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
|
||||
|
||||
ioredis@^3.1.4:
|
||||
ioredis@^3.1.2, ioredis@^3.1.4:
|
||||
version "3.1.4"
|
||||
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-3.1.4.tgz#8688293f5f2f1757e1c812ad17cce49f46d811bc"
|
||||
dependencies:
|
||||
@@ -6724,7 +6727,7 @@ redis-commands@^1.2.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.3.1.tgz#81d826f45fa9c8b2011f4cd7a0fe597d241d442b"
|
||||
|
||||
redis-parser@^2.0.0, redis-parser@^2.4.0, redis-parser@^2.6.0:
|
||||
redis-parser@^2.0.0, redis-parser@^2.4.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b"
|
||||
|
||||
@@ -6732,14 +6735,6 @@ redis@^0.12.1:
|
||||
version "0.12.1"
|
||||
resolved "https://registry.yarnpkg.com/redis/-/redis-0.12.1.tgz#64df76ad0fc8acebaebd2a0645e8a48fac49185e"
|
||||
|
||||
redis@^2.6.3:
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/redis/-/redis-2.8.0.tgz#202288e3f58c49f6079d97af7a10e1303ae14b02"
|
||||
dependencies:
|
||||
double-ended-queue "^2.1.0-0"
|
||||
redis-commands "^1.2.0"
|
||||
redis-parser "^2.6.0"
|
||||
|
||||
redis@~2.6.0-2:
|
||||
version "2.6.5"
|
||||
resolved "https://registry.yarnpkg.com/redis/-/redis-2.6.5.tgz#87c1eff4a489f94b70871f3d08b6988f23a95687"
|
||||
|
||||
Reference in New Issue
Block a user