Open marktani opened 6 years ago
Comment by schickling Tuesday Jan 31, 2017 at 10:36 GMT
That's a really interesting idea, @balupton. Would you imagine that only the newest model version is exposed via the GraphQL schema? How would you want to access older versions of the schema?
Comment by balupton Tuesday Jan 31, 2017 at 10:45 GMT
yeah, by default only the latest model is exposed, older versions can be returned by passing a version field
Comment by sorenbs Friday Mar 03, 2017 at 15:42 GMT
What should happen when the model schema changes?
Say the Photo model looks like this:
type {
url: String!
}
and has this data:
{url: "some.url"}
now you change the model like this:
type {
url: String!,
title: String!
}
with a migration value for the title
.
If you want to query the old values through the same schema we would have to apply the migration value to historical nodes. Ie:
{
allPhotos(version:1){
title
}
}
would return the migration value.
Do you think this is reasonable?
Issue by balupton Tuesday Jan 31, 2017 at 09:09 GMT Originally opened as https://github.com/graphcool/prisma/issues/82
it would be nice if every change of model data created a new version of that particular model item - such that one can go back and revert a previous model item or cycle through revision history of a model item