Skip to content

Commit

Permalink
feat: sort articles by savedAt
Browse files Browse the repository at this point in the history
Currently, the articles are sorted by updatedAt but what we should really
use is savedAt since we have it as a property.
  • Loading branch information
sywhb committed Jul 6, 2022
1 parent 6a524e3 commit 025a04c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const loadArticles = async (
},
body: `{"query":"\\n query Search($after: String, $first: Int, $query: String) {\\n search(first: $first, after: $after, query: $query) {\\n ... on SearchSuccess {\\n edges {\\n node {\\n title\\n slug\\n siteName\\n originalArticleUrl\\n url\\n author\\n updatedAt\\n description\\n savedAt\\n highlights {\\n id\\n quote\\n annotation\\n }\\n labels {\\n name\\n }\\n }\\n }\\n pageInfo {\\n hasNextPage\\n }\\n }\\n ... on SearchError {\\n errorCodes\\n }\\n }\\n }\\n ","variables":{"after":"${after}","first":${first}, "query":"${
updatedAt ? 'updated:' + updatedAt : ''
} sort:updated-asc ${filter}"}}`,
} sort:saved-asc ${filter}"}}`,
method: 'POST',
})

Expand Down

0 comments on commit 025a04c

Please sign in to comment.