chore: further refinements

This commit is contained in:
James
2022-09-11 20:57:30 -07:00
parent ad4f7a5fff
commit 21eb19edd1
10 changed files with 100 additions and 40 deletions

View File

@@ -61,7 +61,7 @@ Field Hooks receive one `args` argument that contains the following properties:
| **`data`** | The data passed to update the document within `create` and `update` operations, and the full document itself in the `afterRead` hook. |
| **`findMany`** | Boolean to denote if this hook is running against finding one, or finding many within the `afterRead` hook. |
| **`operation`** | A string relating to which operation the field type is currently executing within. Useful within `beforeValidate`, `beforeChange`, and `afterChange` hooks to differentiate between `create` and `update` operations. |
| **`originalDoc`** | The full original document in `update` operations. |
| **`originalDoc`** | The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. |
| **`req`** | The Express `request` object. It is mocked for Local API operations. |
| **`siblingData`** | The sibling data passed to a field that the hook is running against. |
| **`value`** | The value of the field. |