Skip to main content

Overview

useFetchManyWorkspaces returns a callable that fetches one page of the caller’s direct-membership + owned workspaces. The actor is derived from the bearer token — no actingUserId is sent. For a managed paginated list with load-more, prefer useFetchManyWorkspacesWrapper.

Usage Example

Parameters

The callable takes an optional params object:
number
Page number.
number
Page size.
string | string[]
Include flags. memberCount adds each row’s direct member count, resolved in one grouped query over the returned page rather than one request per workspace; omit it and the field is absent from each row. An array is joined with commas.

Returns

Returns a PaginatedResponse<Workspace> ({ data, pagination }).