Is there any recommendations for migration/deployment tools so we don’t have to rely on CLI or our own scripts?
It would be nice if it could handle migrations deterministically with autoloading of a model when creating relations so we don’t have to put relations into separate GraphQL definition files.
I was thinking a tool that automatically resolved & injected IDs when I have to @loadModel for a relation. So I can keep both model definitions and relation in the same file and don’t have to split them given the IDs sequential nature.
I would like to avoid having to first deploy the Post separately to obtain the stream ID.
# Load post model (using streamID)
type Post @loadModel(id: "kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96"){
id: ID!
}
# New comment model
# Set relationship to original post
# Enable querying comment to get original post
type Comment @createModel(accountRelation: LIST, description: "A comment on a Post") {
postID: StreamID! @documentReference(model: "Post")
post: Post! @relationDocument(property: "postID")
text: String! @string(maxLength: 500)
}