Skip to content

Commit

Permalink
fix: refetch CmsListPages on new page create
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed May 21, 2019
1 parent 590ce38 commit d108be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webiny-app-cms/src/admin/views/Pages/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default compose(
withHandlers({
createPage: ({ createMutation, history, showSnackbar }) => async category => {
try {
const res = await createMutation({ variables: { category } });
const res = await createMutation({ variables: { category }, refetchQueries: ["CmsListPages"] });
const { data } = res.data.cms.page;
history.push(`/cms/editor/${data.id}`);
} catch (e) {
Expand Down

0 comments on commit d108be7

Please sign in to comment.