> ## Documentation Index
> Fetch the complete documentation index at: https://docs.napps.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MetaObjectService

`metaObjectService` lets you fetch metaobjects by type and handle.

## Global Name

```ts theme={null}
metaObjectService
```

## API

```ts theme={null}
interface MetaObjectService {
  getMetaObjectByHandle(
    type: string,
    handle: string
  ): Promise<MetaObject | null>;
}
```

## Methods

### getMetaObjectByHandle

Fetches a metaobject by type and handle.

```ts theme={null}
const metaobject = await metaObjectService.getMetaObjectByHandle(
  "size_guide",
  "default"
);

if (metaobject) {
  console.log(metaobject.fields);
}
```

Returns `null` when the metaobject is not found.

## MetaObject

```ts theme={null}
interface MetaObject {
  id: string;
  handle: string;
  type: string;
  fields: Record<string, MetaFieldData>;
}

interface MetaFieldData {
  type: string;
  isList: boolean;
  value: MetafieldValue;
  key: string;
}
```

Use this service when your extension needs reusable content or structured data stored as metaobjects.
