I use redis in my apollo server for cache the APQ and response, but i find when my redis disconnect, my server is also shutdown, i think the cache is not necessary, server should ignore the redis error and keep working: send the response. But the reality is different from what I thought, I cant find any solution. My cache config is very simple, like:
const server = new ApolloServer({
typeDefs,
resolvers,
cache: new BaseRedisCache({
client: new Redis({
host: 'redis-server',
}),
}),
dataSources: () => ({
moviesAPI: new MoviesAPI(),
}),
});
Can someone help me solve this problem?