# `Writer.find`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Method of [`Writer`](Writer.md) · inherited by [`Tx`](Tx.md), [`Session`](Session.md), [`testing.FakeSession`](testing.FakeSession.md) · stable · since 2.0.0 · called as `session.find`

```ts
find(query: Query): Parts<C>;
```

A saved search over loaded models and collections. Sync; never throws for no match. Writes
through the result are persistent rules in the `find()` block (spec section 6.10). Passing a
[`Part`](Part.md) rebinds that part to this writer (`tx.find(part)`). `{ node }` matches every part of
that model.
Not for: the model as a whole, which is [`node(nodeId)`](Writer.node.md).

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `find` names no product |
| 2. A precedent | pass: [CSS cascade (ordered, persistent rules)](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascade/Cascade) (row `G32`); [Unity Renderer.bounds](https://docs.unity3d.com/ScriptReference/Renderer-bounds.html) (row `K57`); [DOM Document.querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) (row `K58`); [Unity GameObject.Find](https://docs.unity3d.com/ScriptReference/GameObject.Find.html) (row `K7`) |
| 3. Two apps, or labs | pass: 28 apps (ledger: app-0c773a4ee3, app-4f16d2f6da, app-59c5b5751e, app-b362a81c85, app-b4ae2fce25, app-bcb7ef21da, app-ceb4eccc72, app-ddfb017681 and 5 more; fleet cross-check: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-4fd23bc869, app-510d750508 and 20 more) |
| 4. The cheaper fix first | decided per need in Appendix B: rows `G32`, `K57`, `K58`, `K7` at tier stable (a member only where no rule, data, asset or app code serves the need) |
