Skip to content

Commit

Permalink
feat: introduce climb field in tick
Browse files Browse the repository at this point in the history
  • Loading branch information
vnugent committed Nov 30, 2024
1 parent 0616692 commit ef3a5ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/graphql/schema/Tick.gql
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ type TickType {

"""User public profile"""
user: UserPublicProfile!

"""The climb associated with this tick. Null when the climb doesn't exist in our database."""
climb: Climb
}

"The tick sources that openbeta supports."
Expand Down
5 changes: 5 additions & 0 deletions src/graphql/tick/TickResolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export const TickResolvers = {
user: async (node: TickType, args: any, { dataSources }: GQLContext) => {
const { users } = dataSources
return await users.getUserPublicProfileByUuid(muuid.from(node.userId))
},

climb: async (node: TickType, args: any, { dataSources }: GQLContext) => {
const { areas } = dataSources
return await areas.findOneClimbByUUID(muuid.from(node.climbId))
}
}
}

0 comments on commit ef3a5ab

Please sign in to comment.