Skip to content

Commit ef3a5ab

Browse files
committed
feat: introduce climb field in tick
1 parent 0616692 commit ef3a5ab

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/graphql/schema/Tick.gql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ type TickType {
107107

108108
"""User public profile"""
109109
user: UserPublicProfile!
110+
111+
"""The climb associated with this tick. Null when the climb doesn't exist in our database."""
112+
climb: Climb
110113
}
111114

112115
"The tick sources that openbeta supports."

src/graphql/tick/TickResolvers.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export const TickResolvers = {
77
user: async (node: TickType, args: any, { dataSources }: GQLContext) => {
88
const { users } = dataSources
99
return await users.getUserPublicProfileByUuid(muuid.from(node.userId))
10+
},
11+
12+
climb: async (node: TickType, args: any, { dataSources }: GQLContext) => {
13+
const { areas } = dataSources
14+
return await areas.findOneClimbByUUID(muuid.from(node.climbId))
1015
}
1116
}
1217
}

0 commit comments

Comments
 (0)