Skip to content
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

Broken sort settings field for List of Pages #1994

Closed
dibenso opened this issue Oct 25, 2021 · 0 comments · Fixed by #1997
Closed

Broken sort settings field for List of Pages #1994

dibenso opened this issue Oct 25, 2021 · 0 comments · Fixed by #1997
Assignees

Comments

@dibenso
Copy link
Contributor

dibenso commented Oct 25, 2021

Version

5.16.0

Operating System

Windows 10

Browser

Chrome

What steps will reproduce the bug?

Simply drag and drop a List of Pages page builder element into the editor.

pagelistissue1

What is the expected behavior?

I expect to see a Grid of pages.

What do you see instead?

It always renders as No pages match this criteria.

pagelistissue2

Additional information

List of Pages page builder element does not work since the sort field of the GraphQL query has changed (somewhere after v5.12.0).

Possible solution

The current GraphQL query might look like this is:

{
  pageBuilder {
    listPublishedPages(sort: { publishedOn : "desc" }) {
      data {
        title
      }
    }
  }
}

It appears that the correct GraphQL query for this would be:

{
  pageBuilder {
    listPublishedPages(sort: publishedOn_DESC) {
      data {
        title
      }
    }
  }
}

Notice how the sort field is now an enum of type PbListPagesSort:

enum PbListPagesSort {
  id_ASC
  id_DESC
  savedOn_ASC
  savedOn_DESC
  createdOn_ASC
  createdOn_DESC
  publishedOn_ASC
  publishedOn_DESC
  title_ASC
  title_DESC
}
dibenso added a commit to dibenso/webiny-js that referenced this issue Oct 27, 2021
Ashu96 pushed a commit that referenced this issue Nov 5, 2021
…es (#1997)

* fix(app-page-builder): starting point to fix #1994 `Broken sort settings field for List of Pages`

* fix(app-page-builder): implement pagination for `list of pages`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants