We use fastify and mercurius.
We also use graphql subscriptions using redis pubsub (graphql-redis-subscriptions and io-redis) and setting up the schema of Resolvers ( Queries, Mutations, Subscriptions) while registering mercurius plugin onto fastify server.
Now, once app is up and running and later if Redis is down due to any reason, subscriptions are erroring out and causing app to crash. ( Handled using redisClient.on('error') , process.on('unhandledExceptions') etc , but still it doesnt help ).
Any idea how fastify/mercurius handles such cases? - like, we should be able to safely disable subscriptions OR return empty object for subscriptions while redis is down
My observations include, setting up error handlers only while setting up Fastify server. Not after that.
i.e. Once server is running and we have Redis down, how can we make sure our Fastify server handle subscriptions gracefully.
We use fastify and mercurius. We also use graphql subscriptions using redis pubsub (graphql-redis-subscriptions and io-redis) and setting up the schema of Resolvers ( Queries, Mutations, Subscriptions) while registering mercurius plugin onto fastify server.
Now, once app is up and running and later if Redis is down due to any reason, subscriptions are erroring out and causing app to crash. ( Handled using redisClient.on('error') , process.on('unhandledExceptions') etc , but still it doesnt help ). Any idea how fastify/mercurius handles such cases? - like, we should be able to safely disable subscriptions OR return empty object for subscriptions while redis is down
My observations include, setting up error handlers only while setting up Fastify server. Not after that. i.e. Once server is running and we have Redis down, how can we make sure our Fastify server handle subscriptions gracefully.