From c844fa08483048a721578c6b8d95ce8177fa70ff Mon Sep 17 00:00:00 2001
From: Tassilo Singhammer <tassilo.singhammer@ef.com>
Date: Wed, 10 Jan 2024 21:36:01 +0100
Subject: [PATCH] Adds example with positional record (#6806)

---
 .../v12/api-reference/apollo-federation.md    | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/website/src/docs/hotchocolate/v12/api-reference/apollo-federation.md b/website/src/docs/hotchocolate/v12/api-reference/apollo-federation.md
index e29b8d4c68f..9654e2f6bb1 100644
--- a/website/src/docs/hotchocolate/v12/api-reference/apollo-federation.md
+++ b/website/src/docs/hotchocolate/v12/api-reference/apollo-federation.md
@@ -709,3 +709,23 @@ query {
   }
 }
 ```
+
+## C# Records
+Records can be decorated almost in the same way as classes to add Apollo Federation support.
+The above Product example as a positional record would look like this:
+
+```csharp
+public record Product([property: ID][property: Key] string Id, string Name, float Price)
+{
+    [ReferenceResolver]
+    public static async Task<Product?> ResolveReference(
+        // Represents the value that would be in the Id property of a Product
+        string id,
+        // Example of a service that can resolve the Products
+        ProductBatchDataLoader dataLoader
+    )
+    {
+        return await dataloader.LoadAsync(id);
+    }
+}
+```