GraphQL sorting on fields with dash in name

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

Expected behavior

Minimal reproduction of the problem

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: [VERSION]

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Hi,

When querying content through the GraphQL API I can’t find a way to express an order by on a field naming with a dash:

image

ordering using data/slug/iv desc works fine, but doing so using data/publication-date/iv desc result in the following error:

Failed to parse query: Syntax error at position 17 in 'data/publication-date/iv desc'., for query: ?$top=2&$skip=0&$orderby=data/publication-date/iv desc.

How should I write my query for this to work ?

Thank you

Ok, I found that you need to replace dash characters by underscores in that case