Bookmarks
Manage browser-style bookmarks with collapsible groups. The server auto-fetches page metadata (title) when a bookmark is added.
Type Definitions
type Bookmark {
id: ID!
url: String!
title: String! # auto-fetched from <title> when available
groupId: ID!
pinned: Boolean!
sortOrder: Int!
updatedAt: String!
}
type BookmarkGroup {
id: ID!
name: String!
collapsed: Boolean!
sortOrder: Int!
}
input BookmarkInput {
url: String
title: String
groupId: String
pinned: Boolean
sortOrder: Int
}Operations
bookmarks
List all bookmarks.
query GetBookmarks {
bookmarks { id url title groupId pinned sortOrder updatedAt }
}bookmarkGroups
List all bookmark groups.
query GetBookmarkGroups {
bookmarkGroups { id name collapsed sortOrder }
}addBookmarks
Add one or more bookmarks to a group. The server fires a metadata-fetch event per bookmark to populate the title.
mutation AddBookmarks($urls: [String!]!, $groupId: String!) {
addBookmarks(urls: $urls, groupId: $groupId) { id url title groupId pinned sortOrder updatedAt }
}updateBookmark
Update one or more fields of an existing bookmark.
mutation UpdateBookmark($id: ID!, $input: BookmarkInput!) {
updateBookmark(id: $id, input: $input) { id url title groupId pinned sortOrder updatedAt }
}deleteBookmarks
Delete one or more bookmarks by ID.
mutation DeleteBookmarks($ids: [ID!]!) {
deleteBookmarks(ids: $ids)
}recordBookmarkClick
Record a click on a bookmark (used for analytics / "most visited" sorting).
mutation RecordBookmarkClick($id: ID!) {
recordBookmarkClick(id: $id)
}createBookmarkGroup
Create a new bookmark group.
mutation CreateBookmarkGroup($name: String!) {
createBookmarkGroup(name: $name) { id name collapsed sortOrder }
}updateBookmarkGroup
Update a bookmark group's name, collapsed state, or sort order.
mutation UpdateBookmarkGroup($id: ID!, $name: String!, $collapsed: Boolean!, $sortOrder: Int!) {
updateBookmarkGroup(id: $id, name: $name, collapsed: $collapsed, sortOrder: $sortOrder) {
id name collapsed sortOrder
}
}deleteBookmarkGroup
Delete a bookmark group. Bookmarks inside are not deleted, only ungrouped.
mutation DeleteBookmarkGroup($id: ID!) {
deleteBookmarkGroup(id: $id)
}