-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
79 lines (66 loc) · 1.56 KB
/
schema.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
71
72
73
74
75
76
77
78
79
schema {
query: Query
}
directive @external on FIELD_DEFINITION
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
type Astronaut {
firstName: String!
"""ID is an auto-incrementing value from data store"""
id: ID!
lastName: String!
"""Missions flown by astronaut"""
missions: [Mission]!
}
union AstronautResult = Astronaut | NotFound
scalar DateTime
enum MISSION_STATUS_ENUM {
ABORTED
CANCELED
COMPLETED
FAILED
}
type Mission @key(fields: "mission") {
"""Crew members aboard the mission"""
astronauts: [Astronaut!]!
"""Mapped from cm_name"""
commandModule: String!
"""Duration of the mission in seconds"""
duration: Int
id: ID!
"""
Launch Date of mission including UTC timestamp
**Example:** `10/11/1968 15:02:00`
"""
launchDate: DateTime!
launchVehicle: String!
"""Mapped from lm_name"""
lunarModule: String!
"""
Commonly associated with the name.
**Example:** `Apollo 11`
"""
mission: String!
"""Mapped from remarks"""
notes: String
status: MISSION_STATUS_ENUM!
}
union MissionResult = Mission | NotFound
type NotFound {
message: String!
}
type Query {
"""
Find an Astronaut by their ID
May return a `NotFound`
"""
astronaut(id: Int): AstronautResult!
"""Fetch all Astronauts from the Apollo space program"""
astronauts: [Astronaut]!
hello: String
mission(id: Int!): MissionResult!
"""Fetch all Apollo space program missions"""
missions: [Mission]
}
scalar _FieldSet