Definitions

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

@edfs_natsPublish

directive @edfs__natsPublish(
  subject: String!,
  providerId: String! = "default"
) on FIELD_DEFINITION

type edfs__PublishResult {
    success: Boolean!
}
Argument nameTypeValue
subjectString!The event subject.
providerIdString!The provider ID, which identifies the connection in the router config.yaml. If unsupplied, the provider ID “default” will be used.

@edfs__natsRequest

directive @edfs__natsRequest(
  subject: String!,
  providerId: String! = "default"
) on FIELD_DEFINITION
Argument nameTypeValue
subjectString!The event subject.
providerIdString!The provider ID, which identifies the connection in the router config.yaml.
If unsupplied, the provider ID “default” will be used.

@edfs__natsSubscribe

directive @edfs__natsSubscribe(
  subjects: [String!]!,
  providerId: String! = "default",
  streamConfiguration: edfs__NatsStreamConfiguration
) on FIELD_DEFINITION

input edfs__NatsStreamConfiguration {
    consumerInactiveThreshold: Int! = 30
    consumerName: String!
    streamName: String!
}
Argument nameTypeValue
subjects[String!]!The event subjects (it is possible to subscribe to multiple events). See subjects.
providerIdString!The provider ID, which identifies the connection in the router config.yaml.
If unsupplied, the provider ID “default” will be used.
streamConfigurationedfs__StreamConfigurationConfigures a stream/consumer for a NATS connection.
See Stream and consumer configuration.

For a full example, please refer to:

Was this page helpful?