简体   繁体   中英

Is there any way to get realtime data on apollo server from hasura using graphql subscription?

I am doing a project which need real time changes to be reflected on apollo server from hasura using graphql subscription. Apollo server have PubSub which only get published on trigerring a mutation or query which is on apollo. But I want that from hasura. how can i achieve that?

Not very clear what you are trying to do, but.. hasura allows you to subscribe to DB fields, so to subscribe to the effects of another API in hasura, you would need to update a table in the DB based on some mutation received by apollo server and then subscribe to that table based on some criteria.

Might be worth clarifying your use case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM