Hello -
I'm trying to track a relationship between two entities (a review and a tag) with a strength and then be able to easily return all the tags for a review along with their strength. So I currently have:
type Review {
id: ID!
stars: Int
stars_value: Int
text: String
date: DateTime
user: User @relation(name: "WROTE", direction: "IN")
tags: [Tagged]
}
type Tag {
id: ID!
name: String
reviews: [Tagged]
}
type Tagged @relation(name: "TAGGED") {
from: Review
to: Tag
strength: Int
}
When I pull up a Review(or add a new Review), I need to be able see/set each of the tags with their strength. Can't seem to figure out how to ask for strength though. Hopefully I'm missing something easy!
This works fine for returning all reviews with their tags:
{
Spirit {
name
tags {
name
}
}
}
Would appreciate any suggestions or guidance! Or if someone thinks there is a better way to represent this data!
Thanks.