graphprotocol / graphprotocol/hypergraph
Schema: support subset of the Temporal API
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
This article https://brandondong.github.io/blog/javascript_dates/ (the history part is shocking e.g. how Chrome changed timezone parsing) triggered me to finally read up on the new native Temporal API that’s coming in JS. The best part: with a Polyfill it’s already working
Temporal supports a couple of Date/Time formats we want to have and my suggestion is to only use the Temporal API for Hypergraph. We could start with:
- Temporal.PlainDate (only date without time and timezone)
- Temporal.PlainTime (only time, no date or timezone)
- Temporal.ZonedDateTime (date + time + timezone which can be UTC)
Schema example:
export class Person extends Entity.Class<Person>('Person')({
birthday: Entity.PlainDate,
alarm: Entity.PlainTime,
upgradeToProAccount: Entity.ZonedDateTime,
}) {}
Great article with examples:L https://waspdev.com/articles/2025-05-24/temporal-api
Polyfill: https://www.npmjs.com/package/temporal-polyfill
Also remove Date then.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript schema example and read the linked Temporal API articles and polyfill documentation. Determine how Temporal.PlainDate, Temporal.PlainTime, and Temporal.ZonedDateTime should be represented in Hypergraph schemas, and verify that the existing Date type is removed. The issue names no files or tests, so locating the current schema type definitions is part of the investigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100