惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
O
OpenAI News
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
N
News | PayPal Newsroom
H
Hacker News: Front Page
博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Last Watchdog
The Last Watchdog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Heimdal Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Schneier on Security
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Y
Y Combinator Blog
Cyberwarzone
Cyberwarzone
Microsoft Security Blog
Microsoft Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
GbyAI
GbyAI
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
人人都是产品经理
人人都是产品经理
P
Palo Alto Networks Blog
M
MIT News - Artificial intelligence
G
GRAHAM CLULEY
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
T
Troy Hunt's Blog
L
Lohrmann on Cybersecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
量子位
博客园 - 聂微东
S
Securelist
博客园 - 三生石上(FineUI控件)
F
Full Disclosure
G
Google Developers Blog
L
LINUX DO - 热门话题
P
Proofpoint News Feed
AI
AI
PCI Perspectives
PCI Perspectives

OpenFGA Blog

OpenFGA Accepted into CNCF Incubation 🎉 Fine-Grained News - October 2025 Fine Grained News - September 2025 Fine-Grained News - February 2025 Fine-Grained News - January 2025 Fine-Grained News - November 2024 Fine-Grained News - October 2024 Fine-Grained News - September 2024 Fine-Grained News - August 2024 Fine-Grained News - July 2024 Query Consistency Options in OpenFGA Fine-Grained News - June 2024 Fine-Grained News - May 2024 List Users API Fine-Grained News - April 2024 Modular Models Fine-Grained News - March 2024 Fine-Grained News - February 2024 Fine-Grained News - January 2024
Ignore Duplicate Tuples On Write
Tyler Nix · 2025-10-31 · via OpenFGA Blog

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.

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

For writes:

  • Node.js
  • Go
  • .NET
  • Python
  • Java
  • CLI
  • curl

const options = {

authorizationModelId: "01HVMMBCMGZNT3SED4Z17ECXCA",

conflict: {

onDuplicateWrites: OnDuplicateWrites.Ignore,

}

};

await fgaClient.write({

writes: [

{"user":"user:anne","relation":"viewer","object":"document:roadmap"}

],

}, options);

And deletes:

  • Node.js
  • Go
  • .NET
  • Python
  • Java
  • CLI
  • curl

const options = {

authorizationModelId: "01HVMMBCMGZNT3SED4Z17ECXCA",

conflict: {

onMissingDeletes: OnMissingDeletes.Ignore

}

};

await fgaClient.write({

deletes: [

{ user: 'user:anne', relation: 'owner', object: 'document:roadmap'}

],

}, options);

Get Started

This is supported in the latest versions of the OpenFGA API, SDKs and CLI. Try it out and let us know what you think!

Special thanks to @phamhieu for his contribution to the JavaScript SDK! 🙏

Learn more about Writing Tuples in OpenFGA.

We want your feedback!

Please reach out through our community channels with any questions or feedback.