Nelson Pecora
05/10/2019, 5:49 PMNelson Pecora
05/10/2019, 5:55 PMArticle) have a history relation to HistoryEvent records. Each one of those would have some metadata along with a JSON representation of the Article at that moment. Makes for easy serving of / stepping through / reverting to versions, but it means you can't query / shape properties of the snapshot and it takes up a whole bunch of space)Nelson Pecora
05/10/2019, 5:56 PMNelson Pecora
05/10/2019, 6:02 PMquery {
article(id: "some-uuid", version: 1) {
title
author
}
}Nelson Pecora
05/10/2019, 6:05 PMtype Article {
id: ID!
versions: [ArticleVersion]
}
type ArticleVersion {
id: ID!
title: String
author: String
}
But then queries like this get weird:
query {
articles(where: {title_contains: "some text"}) {
title
author
}
}Nelson Pecora
05/10/2019, 6:20 PM