I have kind of been thinking in the interim, we could do something like that with one caveat:
type Movie {
title: String!
year: Int!
ratings: [Rating]
}
type User {
userId: ID!
name: String!
ratings: [Rating]
}
type Rating {
id: String! @id
user: User! @hasInverse(field: ratings)
movie: Movie! @hasInverse(field: ratings)
rating: Float!
createdAt: DateTime
}
Basically, when we would create a rating, we would create the id as user_movie forcing a unique (composite) identifier based on the relationship.
This may even be better than using facets. I am wondering if there is even a speed difference between a facet and a new type, considering it is all stored as a triple in the database anyway.
J