Files
pocketbase/ui/src/apiPreview/expandInfo.js
2026-04-18 16:50:39 +03:00

26 lines
843 B
JavaScript

export function expandInfo() {
return t.div(
{ className: "api-expand-info" },
t.p(null, "Auto expand record relations. For example:"),
app.components.codeBlock({
value: `?expand=relField1,relField2.subRelField`,
}),
t.p(
null,
"Supports up to 6-levels depth nested relations expansion.",
t.br(),
"The expanded relations will be appended to each individual record under the ",
t.code(null, "expand"),
" property (eg. ",
t.code(null, `"expand": {"relField1": {...}, ...}`),
").",
),
t.p(
null,
"Only the relations to which the request user has permissions to ",
t.strong(null, "view"),
" will be expanded.",
),
);
}