Error while doing sort on field for searchConnection method
Opened this issue · 1 comments
appasahebs commented
Error while doing sort on field for searchConnection method. Specially its not working with "date" type of fields.
Query
postConnection(query: {bool: {must: [
{term: {type: {value: "type"}}}]}},
sort: [post_date__desc], first: 12, after: $after) {
Output
{"errors":[{"message":"Cannot read property 'join' of undefined","locations":[{"line":2,"column":3}],"path":["postConnection"]}],"data":{"postConnection":null}}
Please let me know if I am missing something.
liamraynor commented
Not sure if you fixed this, but the sort has to return a unique cursor so if you had two posts with the same date it won't work, you'd have to use something like an id along with the date that way it will be a unique cursor.