# DataResultRaw

**Category:** Common/Types

## API

### Overview

The return type of the `fetchData` function passed to collection hooks. Contains the `items` array, optional `total` count (after filters), `available` count (before filters), `cursor` for cursor-based pagination, and `hasNext` flag.

### Description

You must return a `DataResultRaw` object from `fetchData()` in collection hooks, such as [`useTableCollection()`](./?path=/story/base-components-collections-table-usetablecollection--usetablecollection) and [`useGridCollection()`](./?path=/story/base-components-collections-grid-usegridcollection--usegridcollection).


### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `items` | `T[]` | Yes | - | Array of items returned from the server. |
| `total` | `number \| null` | No | ``items.length`` | Total items available in the server, *after* applying filters. If not provided, offset pagination will not work correctly. If you are using a cursor and did not include `total` in your query request, you can use the `fetchTotal` function to extract it asynchronously. |
| `available` | `number` | No | - | Total items available in the server, *before* applying filters. |
| `cursor` | `string \| null` | No | - | In case of cursor pagination, this will be the value that will be sent in the query on the next page request. |
| `hasNext` | `boolean \| null` | No | - | Indicates whether there are more items available after the current page. |

