-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypeDefs.graphql
70 lines (61 loc) · 1.07 KB
/
typeDefs.graphql
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
scalar Date
type Event {
id: ID!
title: String!
date: Date!
}
type Hotel {
id: ID!
name: String!
capacity: Int!
pool: Boolean!
spa: Boolean!
avgCost: Int!
skiIn: Boolean
}
type Lift {
id: ID
name: String!
status: LiftStatus!
capacity: Int!
night: Boolean!
elevationGain: Int!
trailAccess: [Trail!]!
}
type Trail {
id: ID
name: String!
status: TrailStatus
difficulty: String!
groomed: Boolean!
trees: Boolean!
night: Boolean!
accessedByLifts: [Lift!]!
}
enum LiftStatus {
OPEN
HOLD
CLOSED
}
enum TrailStatus {
OPEN
CLOSED
}
type Query {
allLifts(status: LiftStatus): [Lift!]!
findLiftById(id: ID!): Lift!
liftCount(status: LiftStatus!): Int!
allTrails(status: TrailStatus): [Trail!]!
findTrailByName(name: String!): Trail!
trailCount(status: TrailStatus!): Int!
allHotels: [Hotel!]!
allEvents: [Event!]!
}
type Mutation {
setLiftStatus(id: ID!, status: LiftStatus!): Lift!
setTrailStatus(id: ID!, status: TrailStatus!): Trail!
}
type Subscription {
liftStatusChange: Lift
trailStatusChange: Trail
}