diff --git a/package.json b/package.json index 32977bd..0b364d7 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ }, "dependencies": { "@prisma/client": "^3.13.0", - "@types/ioredis": "^4.28.8", "apollo-server-express": "2.25.3", "auth0": "^2.40.0", "axios": "^0.26.0", @@ -34,10 +33,8 @@ "graphql": "15.8.0", "graphql-iso-date": "^3.6.1", "graphql-middleware": "^6.1.14", - "graphql-redis-subscriptions": "^2.4.2", "graphql-shield": "^7.5.0", "graphql-subscriptions": "^2.0.0", - "ioredis": "^4.28.5", "jest": "^27.5.1", "jwks-rsa": "^2.0.5", "mailersend": "^1.3.1", diff --git a/src/lib/pubsub/index.ts b/src/lib/pubsub/index.ts index efdd38a..d86d23f 100644 --- a/src/lib/pubsub/index.ts +++ b/src/lib/pubsub/index.ts @@ -1,23 +1,3 @@ -import { RedisPubSub } from 'graphql-redis-subscriptions'; import { PubSub } from 'graphql-subscriptions'; -import Redis from 'ioredis'; -const options: Redis.RedisOptions = { - host: process.env.REDIS_HOST, - port: 6379, - tls: { - servername: process.env.REDIS_HOST, - }, - retryStrategy: (times: number) => { - // reconnect after - return Math.min(times * 50, 2000); - }, -}; - -export const pubsub = - process.env.NODE_ENV == 'production' - ? new RedisPubSub({ - publisher: new Redis(options), - subscriber: new Redis(options), - }) - : new PubSub(); +export const pubsub = new PubSub();