From 6b3b5c6baa958b28e049da5918f030ec1a8842b3 Mon Sep 17 00:00:00 2001 From: Tyler Nix Date: Fri, 31 Oct 2025 16:08:10 -0500 Subject: [PATCH 1/7] Add blog post announcing ignore duplicate writes feature - Announce new on_duplicate and on_missing parameters for Write API - Include SDK documentation links for all five SDKs - Thank @phamhieu for JavaScript SDK contribution - Provide examples --- blog/ignore-duplicate-writes-announcement.md | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 blog/ignore-duplicate-writes-announcement.md diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md new file mode 100644 index 0000000000..31106c112b --- /dev/null +++ b/blog/ignore-duplicate-writes-announcement.md @@ -0,0 +1,80 @@ +--- +title: Ignore Duplicate Tuples On Write +description: OpenFGA now supports ignoring duplicate writes and missing deletes, making data imports much easier and more efficient. +slug: ignore-duplicate-writes-announcement +date: 2025-10-31 +authors: openfga +tags: [openfga,features,write-api] +image: https://openfga.dev/img/og-rich-embed.png +hide_table_of_contents: false +--- + +# Announcing "Ignore Duplicate Writes" in OpenFGA + +We've added two new optional parameters to the Write API endpoint to improve the experience of writing data to FGA. You can now gracefully ["ignore" duplicate writes and missing deletes](https://openfga.dev/docs/getting-started/update-tuples#05-ignoring-duplicate-or-missing-tuples). + +## The Problem + +When you're writing tuples to OpenFGA, it's almost inevitable that you'll try to write a relationship tuple that already exists (e.g., `user:anne` is already a `viewer` of `document:123`) or try to delete one that's already gone. In the past, OpenFGA would reject the entire Write request containing that single duplicate operation. + +This forced developers to build complex error-handling and retry logic on the client-side, just to filter out the single problematic tuple and resend the rest of the batch. This adds latency and operational overhead. + +## The Solution + +The Write API now accepts two new optional parameters to gracefully handle these use cases: + +- **`on_duplicate: "ignore"`**: When included in the `writes` section, this tells OpenFGA to simply skip any tuples that already exist instead of failing the request. + +- **`on_missing: "ignore"`**: When included in the `deletes` section, this tells OpenFGA to skip any tuples that don't exist. + +Now, you can send large batches of writes and deletes without worrying about these common conditions breaking your import. + +## See it in Action + +Here's an example cURL request showing the new parameters: + +```bash +curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ + -H "Authorization: Bearer $FGA_API_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "writes": { + "tuple_keys": [ + { + "user": "user:anne", + "relation": "viewer", + "object": "document:123" + } + ], + "on_duplicate": "ignore" // NEW + }, + "deletes": { + "tuple_keys": [ + { + "user": "user:anne", + "relation": "owner", + "object": "document:123" + } + ], + "on_missing": "ignore" // NEW + } +}' +``` + +## Get Started + +Try it out and let us know what you think! + +- [Java SDK](https://github.com/openfga/java-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [.NET SDK](https://github.com/openfga/dotnet-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [Python SDK](https://github.com/openfga/python-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [Go SDK](https://github.com/openfga/go-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [JavaScript SDK](https://github.com/openfga/js-sdk?tab=readme-ov-file#conflict-options-for-write-operations) + +Special thanks to [@phamhieu](https://github.com/phamhieu) for his [contribution](https://github.com/openfga/js-sdk/pull/276) to the JavaScript SDK! 🙏 + +Learn more about [Writing Tuples in OpenFGA](https://openfga.dev/docs/getting-started/update-tuples#05-ignoring-duplicate-or-missing-tuples). + +## We want your feedback! + +Please reach out through our [community channels](https://openfga.dev/docs/community) with any questions or feedback. \ No newline at end of file From 342ce959c29a2a54e84578c6e2c1876b0f259e3a Mon Sep 17 00:00:00 2001 From: Tyler Nix Date: Fri, 31 Oct 2025 16:26:17 -0500 Subject: [PATCH 2/7] Update blog post with author and optimized image - Add Tyler Nix as valid blog author in authors.yml --- blog/authors.yml | 7 ++++++- blog/ignore-duplicate-writes-announcement.md | 2 +- static/img/blog/authors/tyler.jpg | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 static/img/blog/authors/tyler.jpg diff --git a/blog/authors.yml b/blog/authors.yml index b22519fcd7..8ca85aa8c4 100644 --- a/blog/authors.yml +++ b/blog/authors.yml @@ -15,4 +15,9 @@ hello-caleb: name: Caleb Hunter title: Community Engagement url: https://github.com/hello-caleb - image_url: /img/blog/authors/caleb.jpg \ No newline at end of file + image_url: /img/blog/authors/caleb.jpg +tylernix: + name: Tyler Nix + title: Product Manager + url: https://github.com/tylernix + image_url: /img/blog/authors/tyler.jpg diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index 31106c112b..7ecca3304c 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -3,7 +3,7 @@ title: Ignore Duplicate Tuples On Write description: OpenFGA now supports ignoring duplicate writes and missing deletes, making data imports much easier and more efficient. slug: ignore-duplicate-writes-announcement date: 2025-10-31 -authors: openfga +authors: tylernix tags: [openfga,features,write-api] image: https://openfga.dev/img/og-rich-embed.png hide_table_of_contents: false diff --git a/static/img/blog/authors/tyler.jpg b/static/img/blog/authors/tyler.jpg new file mode 100644 index 0000000000..23298e26b1 --- /dev/null +++ b/static/img/blog/authors/tyler.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2b694ec37f4e9f2abd3bcfe39e01c8fe3ba9c4e2bf8bcc26f492b98d6847eb2 +size 8965 From 930871d51e7c432da08291a8742a9b628e699df4 Mon Sep 17 00:00:00 2001 From: Tyler Nix Date: Fri, 31 Oct 2025 16:31:13 -0500 Subject: [PATCH 3/7] removing comments from json --- blog/ignore-duplicate-writes-announcement.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index 7ecca3304c..190a761824 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -46,7 +46,7 @@ curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ "object": "document:123" } ], - "on_duplicate": "ignore" // NEW + "on_duplicate": "ignore" }, "deletes": { "tuple_keys": [ @@ -56,7 +56,7 @@ curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ "object": "document:123" } ], - "on_missing": "ignore" // NEW + "on_missing": "ignore" } }' ``` From 68364e166ebddb924c77ef3d9893f1f19a528b66 Mon Sep 17 00:00:00 2001 From: Tyler Nix <67964959+tylernix@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:03:19 -0600 Subject: [PATCH 4/7] Update blog/ignore-duplicate-writes-announcement.md Updating SDK order Co-authored-by: Raghd Hamzeh --- blog/ignore-duplicate-writes-announcement.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index 190a761824..5f8795ee6b 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -65,11 +65,12 @@ curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ Try it out and let us know what you think! -- [Java SDK](https://github.com/openfga/java-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [API Docs](https://openfga.dev/api/service#/Relationship%20Tuples/Write) +- [JavaScript SDK](https://github.com/openfga/js-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [Go SDK](https://github.com/openfga/go-sdk?tab=readme-ov-file#conflict-options-for-write-operations) - [.NET SDK](https://github.com/openfga/dotnet-sdk?tab=readme-ov-file#conflict-options-for-write-operations) - [Python SDK](https://github.com/openfga/python-sdk?tab=readme-ov-file#conflict-options-for-write-operations) -- [Go SDK](https://github.com/openfga/go-sdk?tab=readme-ov-file#conflict-options-for-write-operations) -- [JavaScript SDK](https://github.com/openfga/js-sdk?tab=readme-ov-file#conflict-options-for-write-operations) +- [Java SDK](https://github.com/openfga/java-sdk?tab=readme-ov-file#conflict-options-for-write-operations) Special thanks to [@phamhieu](https://github.com/phamhieu) for his [contribution](https://github.com/openfga/js-sdk/pull/276) to the JavaScript SDK! 🙏 From 844cb12c36f9dc3c57306b0aa5d19ffb8880a3a9 Mon Sep 17 00:00:00 2001 From: Tyler Nix <67964959+tylernix@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:03:36 -0600 Subject: [PATCH 5/7] Update blog/ignore-duplicate-writes-announcement.md Co-authored-by: Raghd Hamzeh --- blog/ignore-duplicate-writes-announcement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index 5f8795ee6b..6a51ea26a6 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -63,7 +63,7 @@ curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ ## Get Started -Try it out and let us know what you think! +This is supported in the latest versions of the OpenFGA API, SDKs and CLI. Try it out and let us know what you think! - [API Docs](https://openfga.dev/api/service#/Relationship%20Tuples/Write) - [JavaScript SDK](https://github.com/openfga/js-sdk?tab=readme-ov-file#conflict-options-for-write-operations) From b640304c67d1634be731c5658ad46a4318f35622 Mon Sep 17 00:00:00 2001 From: Tyler Nix <67964959+tylernix@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:03:49 -0600 Subject: [PATCH 6/7] Update blog/ignore-duplicate-writes-announcement.md Co-authored-by: Raghd Hamzeh --- blog/ignore-duplicate-writes-announcement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index 6a51ea26a6..d1a61e6841 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -4,7 +4,7 @@ description: OpenFGA now supports ignoring duplicate writes and missing deletes, slug: ignore-duplicate-writes-announcement date: 2025-10-31 authors: tylernix -tags: [openfga,features,write-api] +tags: [openfga,features,api] image: https://openfga.dev/img/og-rich-embed.png hide_table_of_contents: false --- From 0508f33a17af872a84ab9e11c39d659efc680815 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Thu, 20 Nov 2025 11:29:24 -0500 Subject: [PATCH 7/7] chore: use the WriteRequestViewer --- blog/ignore-duplicate-writes-announcement.md | 83 +++++++++++++------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/blog/ignore-duplicate-writes-announcement.md b/blog/ignore-duplicate-writes-announcement.md index d1a61e6841..72b10981bd 100644 --- a/blog/ignore-duplicate-writes-announcement.md +++ b/blog/ignore-duplicate-writes-announcement.md @@ -9,6 +9,11 @@ image: https://openfga.dev/img/og-rich-embed.png hide_table_of_contents: false --- +import { + SupportedLanguage, + WriteRequestViewer, +} from '@components/Docs'; + # Announcing "Ignore Duplicate Writes" in OpenFGA We've added two new optional parameters to the Write API endpoint to improve the experience of writing data to FGA. You can now gracefully ["ignore" duplicate writes and missing deletes](https://openfga.dev/docs/getting-started/update-tuples#05-ignoring-duplicate-or-missing-tuples). @@ -31,35 +36,55 @@ Now, you can send large batches of writes and deletes without worrying about the ## See it in Action -Here's an example cURL request showing the new parameters: - -```bash -curl -X POST $FGA_API_URL/stores/$FGA_STORE_ID/write \ - -H "Authorization: Bearer $FGA_API_TOKEN" \ - -H "content-type: application/json" \ - -d '{ - "writes": { - "tuple_keys": [ - { - "user": "user:anne", - "relation": "viewer", - "object": "document:123" - } - ], - "on_duplicate": "ignore" - }, - "deletes": { - "tuple_keys": [ - { - "user": "user:anne", - "relation": "owner", - "object": "document:123" - } - ], - "on_missing": "ignore" - } -}' -``` +For writes: + + + +And deletes: + + ## Get Started