aws / aws/aws-appsync-community
Support for ULID with arbitrary timestamp
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
A very common use case we have in our Dynamo Table are ULIDs used as sort keys: not only does this make it trivial to get the most recent items, but it can also very easily be used to query items by arbitrary date ranges. Except this now requires a Lambda to compute a ULID at the specific timestamp(s) we need in our query,[^1] to compute the key condition expression.
Would it be reasonable to extend `$util.autoUlid`[^2] to accept a timestamp parameter, or alternatively add another built-in function to compute such ULIDs?
[^1]: https://github.com/ulid/javascript?tab=readme-ov-file#seed-time
[^2]: https://docs.aws.amazon.com/appsync/latest/devguide/built-in-util-js.html#utility-helpers-in-id-gen-js
Contributor guide
Research direction
Start with the linked AWS AppSync built-in utility documentation and the ULID JavaScript seed-time reference. Assess whether arbitrary-timestamp generation belongs in autoUlid or a new built-in, and identify the AppSync entry point or documentation location involved. Done means the requested ULID values can support DynamoDB sort-key date-range queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, javascript
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100