Skip to main content
The toggleBookmark mutation provides a convenient way to manage user bookmarks. It automatically creates a bookmark if one doesn’t exist, or removes it if it already exists, making it perfect for bookmark toggle buttons in user interfaces.

How It Works

1

Check existing bookmark

The API checks if a bookmark already exists for the specified entity and current user.
2

Toggle bookmark state

  • If bookmark does not exist: Creates a new bookmark
  • If bookmark exists: Removes the existing bookmark
3

Return success response

Returns a success response indicating the operation completed successfully.

GraphQL Mutation

Parameters

BookmarkData Properties

Response