aws-amplify / docs

AWS Amplify Framework Documentation
https://docs.amplify.aws
Apache License 2.0
479 stars 1.02k forks source link

[DOCS] Sort by Date Data Access Example #2883

Closed amcdnl closed 3 years ago

amcdnl commented 3 years ago

Request

The current documentation on https://docs.amplify.aws/cli/graphql-transformer/dataaccess shows a variety of different access patterns, however, a very common one might just to be sort by created date descending. It would be beneficial to spell out that pattern ( or if not support ) then mention that at minimal.

It looks like in another spot of the docs you suggest adding a 'placeholder' like field to give it something to hash on - https://docs.amplify.aws/guides/api-graphql/query-with-sorting/q/platform/js#implementation - maybe worth mentioning this here?

References

dabit3 commented 3 years ago

Hey, have a look at this guide and let me know if this is what you're looking for: https://docs.amplify.aws/guides/api-graphql/query-with-sorting/q/platform/js#overview

amcdnl commented 3 years ago

Yes, however, its not obvious. It should really spell it out "sorting by date requires you to create a new index, we need to add a placeholder field....etc'

medelman17 commented 3 years ago

Closed by #2955