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

# addFavorite



**mutation** `addFavorite(input: AddFavoriteInput!): AddFavoritePayload!`

## Arguments

**`input`**: `AddFavoriteInput!` (required)

## Returns

`AddFavoritePayload!`

**`errors`**: `[AddFavoriteError!]`

---

**`favorite`**: `Favorite`

## Examples

```graphql Mutation
mutation AddFavorite($input: AddFavoriteInput!) {
  addFavorite(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    favorite {
      blockIdentifier
      blockType
      id
      objectId
      tenantId
      userId
    }
  }
}
```

```json Variables
{
  "input": {
    "blockIdentifier": "string",
    "blockType": "NONE"
  }
}
```

```json Response
{
  "data": {
    "addFavorite": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "favorite": {
        "blockIdentifier": "string",
        "blockType": "NONE",
        "id": "id",
        "objectId": "string",
        "tenantId": "value",
        "userId": "value"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.