openbeta-graphql icon indicating copy to clipboard operation
openbeta-graphql copied to clipboard

Image tags should hold a reference to the parent entity

Open Vichy97 opened this issue 1 year ago • 2 comments

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

Vichy97 avatar Nov 11 '24 16:11 Vichy97

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?

CocoisBuggy avatar May 12 '25 19:05 CocoisBuggy

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

Vichy97 avatar May 12 '25 20:05 Vichy97