# Resolver Classification

## Custom vs Built-in

| Category             | Description                                                                        | Implementation                                                               |
| -------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **Custom resolvers** | Mutations that call module commands (create, update, activate, deactivate, assign) | Write `createResolver()` files                                               |
| **Built-in queries** | List and get operations for reading data                                           | Handled automatically by `gqlOperations: "query"` in config — no code needed |

Prefer built-in queries over custom resolvers for list/get operations where possible.

## Operation → Resolver Mapping

| Flow Operation       | Resolver Type | Naming Pattern         |
| -------------------- | ------------- | ---------------------- |
| Create/Add entity    | Mutation      | `create<Entity>`       |
| Update/Modify entity | Mutation      | `update<Entity>`       |
| Delete/Remove entity | Mutation      | `delete<Entity>`       |
| Activate entity      | Mutation      | `activate<Entity>`     |
| Deactivate entity    | Mutation      | `deactivate<Entity>`   |
| Assign X to Y        | Mutation      | `assign<X>To<Y>`       |
| Submit/Approve       | Mutation      | `submit<Entity>` etc.  |
| View/List/Get        | Query         | Built-in (no resolver) |
| Scheduled/Cron job   | N/A           | No resolver — background worker/job |
| Webhook handler      | N/A           | No resolver — external trigger |
| System event         | N/A           | No resolver — internal event processing |
