Skip to content

Conversation

@andershermansen
Copy link
Contributor

What?

Support qs-esm array in sort parameter to sort by multiple columns in REST API

Why?

To align input of Local API and REST API so that REST API also accepts array like Local API do.

How?

Extract parsing/sanitizing of sort input to it's own method which also accept array.
Added unit and integration test. Updated docs with example.

Fixes #15052

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@DanRibbens DanRibbens enabled auto-merge (squash) December 30, 2025 21:33
@DanRibbens DanRibbens merged commit 2ccf898 into payloadcms:main Dec 30, 2025
197 of 201 checks passed
@andershermansen andershermansen deleted the sort-restapi-array branch December 30, 2025 21:47
@geminigeek
Copy link
Contributor

Super

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

🚀 This is included in version v3.70.0

zubricks pushed a commit that referenced this pull request Jan 6, 2026
### What?

Support qs-esm array in sort parameter to sort by multiple columns in
REST API

### Why?

To align input of Local API and REST API so that REST API also accepts
array like Local API do.

### How?

Extract parsing/sanitizing of sort input to it's own method which also
accept array.
Added unit and integration test. Updated docs with example.

Fixes #15052
teastudiopl pushed a commit to teastudiopl/payload that referenced this pull request Jan 8, 2026
### What?

Support qs-esm array in sort parameter to sort by multiple columns in
REST API

### Why?

To align input of Local API and REST API so that REST API also accepts
array like Local API do.

### How?

Extract parsing/sanitizing of sort input to it's own method which also
accept array.
Added unit and integration test. Updated docs with example.

Fixes payloadcms#15052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple Field Sort handling in API endpoints only support commas, qs-esm produces multiple sort differently

3 participants