New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rerender page from the page builder #2092
Conversation
e25fcd4
to
45bfb1b
Compare
We decided to remove the button in the UI and leave only GQL mutation. This way we basically restrict it from non-technical users, that will not be aware what is the purpose of the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
import { GraphQLSchemaPlugin } from "@webiny/handler-graphql/types"; | ||
import { Page, PbContext } from "~/types"; | ||
import Error from "@webiny/error"; | ||
import resolve from "./utils/resolve"; | ||
import pageSettings from "./pages/pageSettings"; | ||
import { fetchEmbed, findProvider } from "./pages/oEmbed"; | ||
import lodashGet from "lodash/get"; | ||
import { PageSecurityPermission } from "@webiny/api-page-builder/types"; | ||
import checkBasePermissions from "@webiny/api-page-builder/graphql/crud/utils/checkBasePermissions"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW @kedrzu, check these two imports. Use "~" when importing from package root.
Wouldn't mention this, but CI/CD threw an error related to these two imports. Using "~" will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, PageSecurityPermission
can be added to the import statement in line 8.
Changes
Right now, the only way for users to re-render a page is to create a new revision of it and publish it again, which is pretty annoying. This adds a feature of re-rendering the page from the page preview:
Also there is a new dedicated mutation
pageBuilder.rerenderPage
that you can use in your own scripts.How Has This Been Tested?
Manual tests of the new
rerenderPage
mutation and admin app.