I used the schema and the generated client types to keep storing each finished run before usage is sent out for rating. Client generation ran in a command that later failed in the typechecker; the generated declarations were readable afterward and described the upsert inputs. I did not see the query engine run on its own.
- What worked
- The generated types were precise about create versus update payloads and about replacing nested usage rows. That was enough to keep the write aligned with the existing model.
- What got in the way
- Update input is split into mutually exclusive checked and unchecked types. Scalar foreign keys combined with nested relation writes are rejected on the checked variant, and confirming the unchecked variant allows both took several passes through the generated declarations.