Skip to content

Multiple fields sort not working for GraphQL #14450

@MartijnDeRoode

Description

@MartijnDeRoode

Describe the Bug

When trying to sort by multiple fields the graphql doesn't sort at all. For the REST API it is working correctly.

Working REST API:
Image

Broken GraphQL API:
Image

It completely breaks, also not 1 of the sorts is applied.

Reproduction Steps

Try to sort with multiple fields on the graphql api.

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Binaries:
  Node: 22.17.0
  npm: N/A
  Yarn: N/A
  pnpm: 10.13.1
Relevant Packages:
  payload: 3.59.1
  next: 15.2.3
  @payloadcms/db-mongodb: 3.59.1
  @payloadcms/email-nodemailer: 3.59.1
  @payloadcms/graphql: 3.59.1
  @payloadcms/next/utilities: 3.59.1
  @payloadcms/plugin-cloud-storage: 3.59.1
  @payloadcms/richtext-lexical: 3.59.1
  @payloadcms/storage-s3: 3.59.1
  @payloadcms/translations: 3.59.1
  @payloadcms/ui/shared: 3.59.1
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 16119
  Available CPU cores: 12

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions