I am not able to find anything that relates to how a response of a query can be ordered using a date.

I want to be able to send an ordered response rather than make the front end make the query that needs ordering.

1 Answers

Ken Chan On Best Solutions

It is nothing that graphql-java will help you. It all depends on the underlying technology and the implementation of the resolver of that root query field. If you are getting the data from DB, you can rely on the SQL ORDER BY. The point is that it the responsibility of the developer to make sure the list of data returned from the resolver is already sorted by a certain order.

If an user does not specify any sort order input argument in the query , you can consider that it means he want the result to be sorted in a some default order.