Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed May 7, 2018
1 parent e490a3c commit c78d507
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ module.exports = {

Query: {
// Use pagination on the query.
allContacts: (root, { pagination, sort }) => new Pagination(Contact, { pagination, sort }),
allContacts: (root, { pagination, sort }) => new Pagination(Contact, { pagination, sort }, {
// Informs the sort that the `createdAt` field specifies a created date.
// Will instead use the document ID when sorting.
sort: { createdField: 'createdAt' },
}),
},
};
```

0 comments on commit c78d507

Please sign in to comment.