You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I just found out that ordering by multiple fields does not work properly when the order is in the variables, rather than in the query itself. Here's a simple example that reproduces the bug.
While investigating this I just noticed that variable values ordering are currently not kept by graphql-core. I opened an issue there to discuss that to check how to proper fix this: graphql-python/graphql-core#225
The fix here will be to create a "v2" of the ordering stuff and use arrays instead.
I wanted to do this in the past, but then I saw that the ordering was respected and decided against it. Now seeing that the issue still exists for variables, and graphql-core will not be able to workaround that (at least not until graphql js does) shows me that this is the correct move.
Describe the Bug
Hello. I just found out that ordering by multiple fields does not work properly when the order is in the variables, rather than in the query itself. Here's a simple example that reproduces the bug.
If you include the order (date DESC, name DESC) in the query itself, you get the correctly ordered response:
Request:
Response:
whereas the response from the following exchange is not ordered as expected.
Request:
Response:
System Information
strawberry-graphql==0.237.3
strawberry-graphql-django==0.47.1
Upvote & Fund
The text was updated successfully, but these errors were encountered: