Page MenuHomeSoftware Heritage
Paste P1141

GraphQL mvp rough schema
ActivePublic

Authored by jayeshv on Aug 31 2021, 10:55 AM.
origin(url) {
url
snapshots
}
snapshots(origin-url, limit) // not a must have
snapshot(sha1) {
sha1
origin
timestamp // timestamp from the visit table, a bit tricky as there could be many visits pointing to the same snapshot
branches(limit) {
name
head revision
}
}
revision(sha1) {
sha1
origins(limit) // a bit tricky, one revision can be in many origins
snapshots(limit) // a bit tricky
author
...
parent revisions(limit)
directory
}
directory(sha1) {
sha1
name
...
contents(limit)
}
content(sha1) {
sha1
name
...
}