We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a14a18d commit 0e24920Copy full SHA for 0e24920
develop-docs/ingestion/relay/relay-best-practices.mdx
@@ -16,6 +16,18 @@ Make sure changes to the event protocol and APIs are forward-compatible. Relay s
16
or truncate data it does not understand. It is a supported use-case to have customers running
17
outdated Relays but up-to-date SDKs.
18
19
+For example, `enum`s in the event protocol (or any other data type received from the SDK) need to have a catchall variant
20
+such that customer relays running an older version can still forward the data:
21
+
22
+```rust
23
+enum EventColor {
24
+ Red,
25
+ Green,
26
+ Blue,
27
+ /// Unknown color, for forward compatibility.
28
+ Unknown(String),
29
+}
30
+```
31
32
## Feature Gate new Functionality
33
0 commit comments