From f7935d56d018da6a2731c7f7e1654cb679f23981 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:15:17 -0400 Subject: [PATCH] Add documentation for resolveUsers 50-user batch limit (#2557) --- docs/pages/api-reference/liveblocks-client.mdx | 4 ++++ docs/pages/api-reference/liveblocks-react.mdx | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/pages/api-reference/liveblocks-client.mdx b/docs/pages/api-reference/liveblocks-client.mdx index d7fa7395038..c20723a060e 100644 --- a/docs/pages/api-reference/liveblocks-client.mdx +++ b/docs/pages/api-reference/liveblocks-client.mdx @@ -430,6 +430,10 @@ components, such as a user’s name or avatar, you need to resolve these IDs int user objects. This function receives a list of user IDs and you should return a list of user objects of the same size, in the same order. +User IDs are automatically resolved in batches with a maximum of 50 users per +batch to optimize performance and prevent overwhelming your user resolution +function. + ```tsx import { createClient } from "@liveblocks/client"; diff --git a/docs/pages/api-reference/liveblocks-react.mdx b/docs/pages/api-reference/liveblocks-react.mdx index d52f54e6be5..681cf7cca69 100644 --- a/docs/pages/api-reference/liveblocks-react.mdx +++ b/docs/pages/api-reference/liveblocks-react.mdx @@ -676,6 +676,10 @@ components, such as a user’s name or avatar, you need to resolve these IDs int user objects. This function receives a list of user IDs and you should return a list of user objects of the same size, in the same order. +User IDs are automatically resolved in batches with a maximum of 50 users per +batch to optimize performance and prevent overwhelming your user resolution +function. + ```tsx import { LiveblocksProvider } from "@liveblocks/react/suspense"; @@ -2065,7 +2069,7 @@ type Storage = { // Optionally, UserMeta represents static/readonly metadata on each user, as // provided by your own custom auth back end (if used). Useful for data that -// will not change during a session, like a user's name or avatar. +// will not change during a session, like a user’s name or avatar. // type UserMeta = { // id?: string, // Accessible through `user.id` // info?: Json, // Accessible through `user.info` @@ -4295,7 +4299,7 @@ type Storage = { // Optionally, UserMeta represents static/readonly metadata on each user, as // provided by your own custom auth back end (if used). Useful for data that -// will not change during a session, like a user's name or avatar. +// will not change during a session, like a user’s name or avatar. // type UserMeta = { // id?: string, // Accessible through `user.id` // info?: Json, // Accessible through `user.info`