Redis - WunderGraph

Definitions

The providerId argument, including the default value “default”, must correspond to an equivalent property in events.providers.redis entry of the router config.yml.

@edfs__redisPublish

directive @edfs__redisPublish(
  channel: String!,
  providerId: String! = "default"
) on FIELD_DEFINITION

type edfs__PublishResult {
    success: Boolean!
}
Argument name Type Value
channel String! The event channel.
providerId String! The provider ID, which identifies the connection in the router config.yaml.
If unsupplied, the provider ID “default” will be used.

@edfs__redisSubscribe

directive @edfs__redisSubscribe(
  channels: [String!]!,
  providerId: String! = "default"
) on FIELD_DEFINITION
Argument name Type Value
channels [String!]! The event channels. It is possible to subscribe to multiple topics.
Also, subscription is done using PSUBSCRIBEso some pattern matching can be used, as per redis documentation: https://redis.io/docs/latest/commands/psubscribe/.
providerId String! The provider ID, which identifies the connection in the router config.yaml.
If unsupplied, the provider ID “default” will be used.