I want to use Google PubSub and Redis PubSub provided by Google Cloud in Javascript GraphQL(apollo-server).
I tried to create 2 subscription fields, but I couldn’t get the result I wanted.
this, it said that subscriptions do not provide more than two root fields.
How can I subscribe to 2 pubSub objects?
The code I used is like below.
Subscription: {
operation: {
subscribe: withFilter(
(_, { channelId }, { pubSub }) => pubSub.asyncIterator(getTopic(channelId)),
(payload, variables) => {
// Some Code...
}
),
},
},