While implementing pagination & reading spring for graphql documentation, I came across the following There is built-in support for Spring Data’s Sort as a controller method argument. For this to work, you need to have a SortStrategy bean.
Could someone perhaps explain a bit more or show some pseudo code?
Thanks a lot
I was able to solve the above, here what I did.
1. In my graphql schema file, I made the following changes
2. Defined the bean as suggested in the spring for graphql documentation
3. Made following changes to my controller
Points specific to my solutionar are that I am using pagination so if thats not the case with you then it would be Schema:
Controller:
I hope this is helpful to you