Add a new graphql mutation in the pageLayout resolver to handle page layout update with tabs and widgets (#14612)

Add a new graphql mutation in the pageLayout resolver to handle page
layout update with tabs and widgets.

Later we will add validation inside the service to check if the page
layout tab structure is correct (for instance check widgets don't
overlap or aren't out of the grid, or to check that they have a correct
configuration ...).

This mutation will be plugged to the save action of the dashboards in
the frontend.
This commit is contained in:
Raphaël Bosi
2025-09-23 11:00:36 +02:00
committed by GitHub
parent fbd3286792
commit 7cb294169d
20 changed files with 1858 additions and 8 deletions
@@ -1544,6 +1544,7 @@ export type Mutation = {
updatePageLayout: PageLayout;
updatePageLayoutTab: PageLayoutTab;
updatePageLayoutWidget: PageLayoutWidget;
updatePageLayoutWithTabsAndWidgets: PageLayout;
updatePasswordViaResetToken: InvalidatePassword;
updateWebhook?: Maybe<Webhook>;
updateWorkflowRunStep: WorkflowAction;
@@ -2220,6 +2221,12 @@ export type MutationUpdatePageLayoutWidgetArgs = {
};
export type MutationUpdatePageLayoutWithTabsAndWidgetsArgs = {
id: Scalars['String'];
input: UpdatePageLayoutWithTabsInput;
};
export type MutationUpdatePasswordViaResetTokenArgs = {
newPassword: Scalars['String'];
passwordResetToken: Scalars['String'];
@@ -3448,6 +3455,13 @@ export type UpdatePageLayoutTabInput = {
title?: InputMaybe<Scalars['String']>;
};
export type UpdatePageLayoutTabWithWidgetsInput = {
id: Scalars['UUID'];
position: Scalars['Float'];
title: Scalars['String'];
widgets: Array<UpdatePageLayoutWidgetWithIdInput>;
};
export type UpdatePageLayoutWidgetInput = {
configuration?: InputMaybe<Scalars['JSON']>;
gridPosition?: InputMaybe<GridPositionInput>;
@@ -3456,6 +3470,23 @@ export type UpdatePageLayoutWidgetInput = {
type?: InputMaybe<WidgetType>;
};
export type UpdatePageLayoutWidgetWithIdInput = {
configuration: Scalars['JSON'];
gridPosition: GridPositionInput;
id: Scalars['UUID'];
objectMetadataId?: InputMaybe<Scalars['UUID']>;
pageLayoutTabId: Scalars['UUID'];
title: Scalars['String'];
type: WidgetType;
};
export type UpdatePageLayoutWithTabsInput = {
name: Scalars['String'];
objectMetadataId: Scalars['UUID'];
tabs: Array<UpdatePageLayoutTabWithWidgetsInput>;
type: PageLayoutType;
};
export type UpdateRoleInput = {
/** The id of the role to update */
id: Scalars['UUID'];