Skip to content

Page Builder - Make Settings Extendable #2168

Open
@Pavel910

Description

@Pavel910

Is your feature request related to a problem? Please describe.

Trying to develop a plugin which extends Page Builder Website Settings, and the problem arises on settings update. Only the fields present in the validation model are being taken into consideration, and there's no hook which allows me to add an extra field myself:

https://github.com/webiny/webiny-js/blob/next/packages/api-page-builder/src/graphql/crud/settings.crud.ts#L231-L239

Describe the solution you'd like.

Settings input validation should be moved into a hook, same way we do with Pages:
https://github.com/webiny/webiny-js/blob/next/packages/api-page-builder/src/graphql/crud/pages.validation.ts

Validation must be removed from the CRUD method itself, and a lifecycle hook should be added. Here's an example of this same approach in the pages.crud.ts: https://github.com/webiny/webiny-js/blob/next/packages/api-page-builder/src/graphql/crud/pages.crud.ts#L477-L481

Describe alternatives you've considered.

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions