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

GraphQL errors when passing sort parameters as separate variables #583

Closed
2 tasks done
priyashantha opened this issue May 8, 2024 · 1 comment
Closed
2 tasks done

Comments

@priyashantha
Copy link

Module version(s) affected

4.3 and above

Description

When the sort params are passed separately in variables a graphql error is triggered. When sort params are attached inside the query it works fine. There was no issue with "silverstripe/graphql" version 4.2.5. Issue happens on versions after that version i.e. 4.3., 5.

Screenshot 2024-05-08 at 1 11 37 PM

How to reproduce

Here is the query I'm using

query Pages($limit: Int, $sortBy: PageSortFields) {
  readPages(limit: $limit, sort: $sortBy) {
    edges {
      node {
        id
        title
      }
    }
  }
}

And the variables

{
    "sortBy": {
        "title": "DESC"
    }
}

Possible Solution

No response

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@kinglozzer
Copy link
Member

Duplicate of #571

@kinglozzer kinglozzer marked this as a duplicate of #571 May 8, 2024
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

No branches or pull requests

2 participants