The rules
What this means for your code
Golden rule: use the
id you were given. Every create returns the
resource with its permanent id. Read-after-write must always go through
read(id) — never through search — and you should never poll search to
confirm that a create succeeded. If create returned 200, the resource
exists.Practical patterns
- After a form submit, render the confirmation screen from the
createresponse itself (you already have the full resource) instead of re-querying a list. - List screens that need to show a just-created item immediately should
merge the
createresponse into their local state (optimistic append), then reconcile on the next natural refresh. - Batch imports: track the returned IDs as your source of truth for what was written; use search only for later exploration, not verification.
- Deletes: hide the row locally on a successful
delete— don’t wait for it to disappear from search results.