-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathAreaEdit.gql
More file actions
189 lines (173 loc) · 6.41 KB
/
AreaEdit.gql
File metadata and controls
189 lines (173 loc) · 6.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
type Mutation {
"""
Add an area
"""
addArea(input: AreaInput): Area
"""
Update area attributes
"""
updateArea(input: AreEditableFieldsInput): Area
"""
Set area destination flag
"""
setDestinationFlag(input: DestinationFlagInput): Area
"""
Remove an area
"""
removeArea(input: RemoveAreaInput): Area
"""
Update area sorting order in bulk
"""
updateAreasSortingOrder(input: [AreaSortingInput]): [ID]
"""
Add or update an area tree in bulk, including climbs (and their pitches).
You can start at any point in the tree given a valid parent area with its uuid.
If starting at the root level, the `countryCode` must be provided.
"""
bulkImportAreas(input: BulkImportInput): BulkImportResult
}
input DestinationFlagInput {
id: ID!
flag: Boolean!
}
input CountryInput {
alpha3ISOCode: String
}
input AreaInput {
name: String!
parentUuid: ID
countryCode: String
isDestination: Boolean
isLeaf: Boolean
isBoulder: Boolean
experimentalAuthor: ExperimentalAuthorType
lat: Float
lng: Float
}
"""
Bulk input for adding or updating areas, climbs, and pitches.
"""
input BulkImportInput {
areas: [BulkImportAreaInput]!
}
"""
Bulk input for adding or updating areas.
Provide either a `uuid` to UPDATE an existing area, or `areaName` to ADD a new area.
"""
input BulkImportAreaInput {
"The area UUID"
uuid: ID
"The name of the new area (or, if provided together with a uuid, the updated name of the area)"
areaName: String
"The name that this area is commonly identified by within the climbing community."
description: String
"Only relevant for the first level of areas (i. e. USA -> Utah). Must be ISO 3166-1 Alpha-3 country code (e. g. ‘USA’)."
countryCode: String
"The grading system used for climbing/bouldering in the area. Inherits from parent node if current node does not have one. UIAA = UIAA/font, US = yds/vscale, FR = french/font (see https://github.com/OpenBeta/openbeta-graphql/blob/9c517329db079c922fe7f092a78b658cb295e158/src/GradeUtils.ts#L40.)"
gradeContext: String
"The sorting index of the area. Defaults to -1 if not provided."
leftRightIndex: Int
"Longitude coordinate of the area, using the WGS 84 reference system."
lng: Float
"Latitude coordinate of the area, using the WGS 84 reference system."
lat: Float
"An optional bounding box that can be displayed on maps, using GeoJSON bbox (see https://datatracker.ietf.org/doc/html/rfc7946#section-5)."
bbox: [Float]
"A list of child areas. Can be deeply nested."
children: [BulkImportAreaInput]
"""
A list of climbs that are directly associated with this area.
An area that has climbs cannot have child areas and automatically becomes a leaf node.
"""
climbs: [BulkImportClimbInput]
}
"""
Bulk input for adding or updating climbs (and pitches) within an area.
Either define `uuid` or `name` to indicate whether to add or update a climb.
Provide a `uuid` to UPDATE a climb, and `name` to ADD a new climb.
Make sure to update all climbs if the leftRightIndex of a climb is updated.
"""
input BulkImportClimbInput {
"The climb UUID"
uuid: ID
"The name that this climb is commonly identified by (or if provided together with a uuid, the updated name of the climb)."
name: String
"The difficulty grade of the climb. Must be coherent with the area's gradeContext. I. e. gradeContext = 'US' requires denomination in yds/vscale (climbing/bouldering), so '5.11'/'V14', 'FR' would be french/font '9c+'/'9a', 'UIIA' would be uiaa/font '9+'/'9a'. (see https://github.com/OpenBeta/sandbag)."
grade: String!
"Object of applicable disciplines (e.g. { \"trad\": true }). Options: trad, sport, bouldering, deepwatersolo, alpine, ice, mixed, aid, tr (= toprope). Can be combined."
disciplines: DisciplineType!
"The safety rating of a climb based on US movie ratings (see https://github.com/OpenBeta/openbeta-graphql/blob/9c517329db079c922fe7f092a78b658cb295e158/src/graphql/schema/Climb.gql#L177)."
safety: SafetyEnum
"Longitude coordinate of the climb, using the WGS 84 reference system."
lng: Float
"Latitude coordinate of the climb, using the WGS 84 reference system."
lat: Float
"A numeric index used for sorting climbs from left to right (of a wall)."
leftRightIndex: Int
"The description of this climb, this is the main text field for this climb. This contains beta, visual descriptors, and any other information useful to identifying and attempting the climb."
description: String
"The location of the climb, e.g. 'The first climb on the left, entry directly behind the tree'."
location: String
"The protection of the climb, e.g. 'Long run out to the first bolt'."
protection: String
"The first ascent information of the climb. Usually formatted as: name(s) (year)."
fa: String
"Total length in meters if known (-1 otherwise)"
length: Int
"The number of bolts (fixed anchors) on the climb."
boltsCount: Int
"The experimental author of the climb."
experimentalAuthor: ExperimentalAuthorType
"A list of pitches that are directly associated with this climb (applies only to multi-pitch climbs)."
pitches: [BulkImportPitchesInput]
}
"""
Bulk input for adding or updating pitches within a climb.
Provide `id` to UPDATE an existing pitch.
Make sure to update all pitches if the pitchNumber of one pitch is changed.
"""
input BulkImportPitchesInput {
"The pitch UUID (if provided, the pitch data will be UPDATED)."
id: ID
"The number of the pitch in the sequence."
pitchNumber: Int!
"The difficulty grade of the pitch (see Climb.grade)."
grade: String!
"The climbing disciplines applicable to the pitch (see Climb.disciplines)."
disciplines: DisciplineType
"The description of the pitch."
description: String
"The length of the pitch in meters."
length: Int
"The number of bolts (fixed anchors) on the pitch."
boltsCount: Int
}
type BulkImportResult {
addedAreas: [Area]
updatedAreas: [Area]
addedOrUpdatedClimbs: [Climb]
}
input RemoveAreaInput {
uuid: String!
}
input AreEditableFieldsInput {
uuid: String!
areaName: String
isDestination: Boolean
isLeaf: Boolean
isBoulder: Boolean
shortCode: String
lat: Float
lng: Float
description: String
areaLocation: String
experimentalAuthor: ExperimentalAuthorType
leftRightIndex: Int
}
"Area sorting input param"
input AreaSortingInput {
"Area UUID"
areaId: String!
"Left-to-right sorting index. The backend enforces uniqueness for value >= 0. Use -1 to indicate unsorted order."
leftRightIndex: Int!
}