Problem/Motivation

Listings are the second most common kind and the one with the most shared behaviour to get right once: pagination, sorting, filtering, the redirect a page past the end produces, the breadcrumbs, and the facets when a search index backs the listing. The forks implement all of this per resource, which is where the pagination bugs live.

Proposed resolution

  • MyrestEntityListResourceBase serving both sources: an entity query, and a search_api index when the convention names one.
  • Pagination, sorting and filtering handled once, with the parameter names the module already documents in its OpenAPI.
  • The out-of-range redirect response kept exactly as it is documented today.
  • Facets delegated to the facets convention; absent convention, absent key.
  • Cache contexts that actually reflect the query parameters — the current per-resource implementations disagree with each other about this.

Remaining tasks

Everything.

Issue fork myrest-3620647

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 6d811b04 on 1.0.x
    Issue #3620647: Add the entity list resource base class with both query...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)