We have hosted the application graphql redis subscriptions in order to run this application in our online workstations with Wine or directly.


Quick description about graphql redis subscriptions:

This package implements the PubSubEngine Interface from the graphql-subscriptions package and also the new AsyncIterator interface. It allows you to connect your subscriptions manager to a Redis Pub Sub mechanism to support multiple subscription manager instances. As the graphql-subscriptions package is declared as a peer dependency, you might receive a warning about an unmet peer dependency if it's not installed already by one of your other packages. Calling the method asyncIterator of the RedisPubSub instance will send redis a SUBSCRIBE message to the topic provided and will return an AsyncIterator binded to the RedisPubSub instance and listens to any event published on that topic. Now, the GraphQL engine knows that somethingChanged is a subscription, and every time we will use pubsub.publish over this topic, the RedisPubSub will PUBLISH the event over redis to all other subscribed instances and those in their turn will emit the event to GraphQL using the next callback.

Features:
  • Define your GraphQL schema with a Subscription type
  • Implement your Subscriptions type resolver, using the pubsub.asyncIterator to map the event you need
  • Use a pattern on subscription
  • Use both arguments and payload to filter events
  • Dynamically create a topic based on subscription args passed on the query
  • Configure RedisPubSub


Programming Language: TypeScript.
Categories:
Software Development

Page navigation:

©2024. Winfy. All Rights Reserved.

By OD Group OU – Registry code: 1609791 -VAT number: EE102345621.