Image tags should hold a reference to the parent entity
On mobile I would like to access the path tokens instead of just the ancestor ids. Instead of adding a new field, image tags could just hold a reference to the parent area or climb
To clarify: the tags should resolve to their actual entity nodes?
type Tag {
_id: ID
mediaUrl: String!
mediaUuid: ID!
destinationId: ID!
destinationType: Int!
area: Area
climb: Climb
}
and then maybe
"Represent a media object"
type MediaWithTags implements IMediaMetadata {
id: ID!
username: String
user: UserPublicProfile
mediaUrl: String!
width: Int!
height: Int!
format: String!
uploadTime: Date!
size: Int!
entityTags: [EntityTag]
areas: [Area!]!
climbs: [Climb!]!
}
Is that the general idea?
To clarify: the tags should resolve to their actual entity nodes?
type Tag { _id: ID mediaUrl: String! mediaUuid: ID! destinationId: ID! destinationType: Int! area: Area climb: Climb } and then maybe
"Represent a media object" type MediaWithTags implements IMediaMetadata { id: ID! username: String user: UserPublicProfile mediaUrl: String! width: Int! height: Int! format: String! uploadTime: Date! size: Int! entityTags: [EntityTag] areas: [Area!]! climbs: [Climb!]! } Is that the general idea?
Yup thats exactly what I was thinking! I don't think MediaWithTags needs the area or climb though. I think you should just resolve that through the tag itself