Dokumentacja dla programistów

Ulubione

Aktualizacja 2026-09-06

Na platformie monday.com możesz dodać do ulubionych często używane tablice, pulpity i dokumenty. Ulubione obiekty pojawią się w osobnej sekcji Ulubione w menu po lewej stronie, aby można było szybko uzyskać do nich dostęp.

Ulubione - ilustracja 1

Zapytania

Pobieranie ulubionych

  • Zwraca metadane listy ulubionych
  • Można wykonać tylko na poziomie głównym; nie można zagnieżdżać w innym zapytaniu
query {
  favorites {
    accountId
    createdAt
    folderId
    hierarchyListData {
      id
      type
    }
    id
    object {
      id
      type
    }
    position
    updatedAt
  }
}
{
  "data": {
    "favorites": [
      {
        "accountId": 9876543210,
        "createdAt": null,
        "folderId": null,
        "hierarchyListData": {
          "id": "123456",
          "type": "PersonalList"
        },
        "id": "98765",
        "object": {
          "id": "11223344",
          "type": "Overview"
        },
        "position": 65500,
        "updatedAt": null
      },
      {
        "accountId": 9876543210,
        "createdAt": null,
        "folderId": null,
        "hierarchyListData": {
          "id": "123456",
          "type": "PersonalList"
        },
        "id": "12345",
        "object": {
          "id": "44332211",
          "type": "Board"
        },
        "position": 65400,
        "updatedAt": null
      }
    ]
  },
  "extensions": {
    "request_id": "YOUR_REQUEST_ID"
  }
}

Pola

Pole Typ Opis
accountId Int Identyfikator konta, do którego należy ulubiony obiekt.
createdAt Date Data i godzina utworzenia ulubionego obiektu.
folderId ID Unikalny identyfikator folderu, w którym znajduje się ulubiony obiekt, jeśli dotyczy.
hierarchyListData ListID Typ i unikalny identyfikator listy.
id ID Unikalny identyfikator ulubionego obiektu.
object HierarchyObjectId Typ i unikalny identyfikator ulubionego obiektu.
position Float Pozycja ulubionego obiektu na liście lub w folderze.
updatedAt Date Data i godzina ostatniej aktualizacji ulubionego obiektu.

Mutacje

Dodawanie do ulubionych

Dodaje nowy ulubiony obiekt. Zwraca CreateFavoriteResultType.

mutation {
  create_favorite(
    input: {
      name: "Tasks"
      object: {
        id: 1234567890
        type: Board
      }
      newPosition: {
        prevObject: {
          id: 9876543210
          type: Overview
        }
      }
    }
  ) {
    favorites {
      position
      id
    }
  }
}
{
  "data": {
    "create_favorite": {
      "favorites": {
        "position": 12345,
        "id": "98765"
      }
    }
  },
  "extensions": {
    "request_id": "YOUR_REQUEST_ID"
  }
}

Argumenty

Argument Typ Opis
input CreateFavoriteInput! Nazwa, pozycja, identyfikator i typ nowego ulubionego obiektu.

Zmiana pozycji ulubionego obiektu

Zmienia pozycję ulubionego obiektu. Zwraca UpdateFavoriteResultType.

mutation {
  update_favorite_position(
    input: {
      object: {
        id: 1234567890
        type: Board
      }
      newPosition: {
        nextObject: {
          id: 9876543210
          type: Overview
        }
      }
    }
  ) {
    favorites {
      position
      id
      hierarchyListData {
        id
        type
      }
    }
  }
}
{
  "data": {
    "update_favorite_position": {
      "favorites": {
        "position": 54321,
        "id": "98765",
        "hierarchyListData": {
          "id": "123456",
          "type": "PersonalList"
        }
      }
    }
  },
  "extensions": {
    "request_id": "YOUR_REQUEST_ID"
  }
}

Argumenty

Argument Typ Opis
input UpdateObjectHierarchyPositionInput! Nowa pozycja i typ ulubionego obiektu.

Usuwanie z ulubionych

Usuwa ulubiony obiekt. Zwraca DeleteFavoriteInputResultType.

mutation {
  delete_favorite(
    input: {
      object: {
        id: 1234567890
        type: Board
      }
    }
  ) {
    success
  }
}
{
  "data": {
    "delete_favorite": {
      "success": true
    }
  },
  "extensions": {
    "request_id": "YOUR_REQUEST_ID"
  }
}

Argumenty

Argument Typ Opis
input DeleteFavoriteInput! Dane wejściowe usuwanego ulubionego obiektu.