Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
How to use more than one pubsub in javascript grapql?

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...
           
        }
      ),
    },
  },

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!