---
url: "https://vueda.dev/v3/reference/api/js/stores/storeModelInfo/methods/fetchModelInfo.md"
title: "fetchModelInfo"
---

# fetchModelInfo

## Overview

Fetches the model info for an app and model, and caches it in `infos`.

A cached result resolves at once, and a cached error rejects at once. A request already in
flight for the same model is shared. The response keys are converted to camelCase, and `pk`
is set to the name of the primary key field.

## Signature

`fetchModelInfo(args)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-args">args</span> | `object` | yes | The model to fetch info for. |

#### args Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-args-app">app</span> | `string` |  |  | Django app label. |
| <span id="param-args-model">model</span> | `string` |  |  | Model name. |

### Returns

`any`

A promise for
 the model info. It rejects with `ModelInfoError` when the request fails, and with
 `AuthScopeInvalidatedError` if the authenticated user changes while it is in flight. It rejects
 with a plain `Error` when `app` or `model` is missing or when the response has no primary
 key field.

## Source

`client/lib/stores/storeModelInfo.js:346`
