Skip to content

Commit 649db0d

Browse files
mandiwisebenjie
andauthored
Update introspection docs (graphql#1812)
Co-authored-by: Benjie <[email protected]>
1 parent 53f4f75 commit 649db0d

File tree

2 files changed

+120
-111
lines changed

2 files changed

+120
-111
lines changed

src/components/marked/swapi-schema.tsx

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const typeDefs = /* GraphQL */ `
1717
mutation: Mutation
1818
}
1919
20-
# The query type, represents all of the entry points into our object graph
20+
"The query type, represents all of the entry points into our object graph"
2121
type Query {
2222
hero(episode: Episode): Character
2323
reviews(episode: Episode!): [Review]
@@ -28,155 +28,155 @@ const typeDefs = /* GraphQL */ `
2828
starship(id: ID!): Starship
2929
}
3030
31-
# The mutation type, represents all updates we can make to our data
31+
"The mutation type, represents all updates we can make to our data"
3232
type Mutation {
3333
createReview(episode: Episode, review: ReviewInput!): Review
3434
}
3535
36-
# The episodes in the Star Wars trilogy
36+
"The episodes in the Star Wars trilogy"
3737
enum Episode {
38-
# Star Wars Episode IV: A New Hope, released in 1977.
38+
"Star Wars Episode IV: A New Hope, released in 1977."
3939
NEWHOPE
4040
41-
# Star Wars Episode V: The Empire Strikes Back, released in 1980.
41+
"Star Wars Episode V: The Empire Strikes Back, released in 1980."
4242
EMPIRE
4343
44-
# Star Wars Episode VI: Return of the Jedi, released in 1983.
44+
"Star Wars Episode VI: Return of the Jedi, released in 1983."
4545
JEDI
4646
}
4747
48-
# A character from the Star Wars universe
48+
"A character from the Star Wars universe"
4949
interface Character {
50-
# The ID of the character
50+
"The ID of the character"
5151
id: ID!
5252
53-
# The name of the character
53+
"The name of the character"
5454
name: String!
5555
56-
# The friends of the character, or an empty list if they have none
56+
"The friends of the character, or an empty list if they have none"
5757
friends: [Character]
5858
59-
# The friends of the character exposed as a connection with edges
59+
"The friends of the character exposed as a connection with edges"
6060
friendsConnection(first: Int, after: ID): FriendsConnection!
6161
62-
# The movies this character appears in
62+
"The movies this character appears in"
6363
appearsIn: [Episode]!
6464
}
6565
66-
# Units of height
66+
"Units of height"
6767
enum LengthUnit {
68-
# The standard unit around the world
68+
"The standard unit around the world"
6969
METER
7070
71-
# Primarily used in the United States
71+
"Primarily used in the United States"
7272
FOOT
7373
}
7474
75-
# A humanoid creature from the Star Wars universe
75+
"A humanoid creature from the Star Wars universe"
7676
type Human implements Character {
77-
# The ID of the human
77+
"The ID of the human"
7878
id: ID!
7979
80-
# What this human calls themselves
80+
"What this human calls themselves"
8181
name: String!
8282
83-
# Height in the preferred unit, default is meters
83+
"Height in the preferred unit, default is meters"
8484
height(unit: LengthUnit = METER): Float
8585
86-
# Mass in kilograms, or null if unknown
86+
"Mass in kilograms, or null if unknown"
8787
mass: Float
8888
89-
# This human's friends, or an empty list if they have none
89+
"This human's friends, or an empty list if they have none"
9090
friends: [Character]
9191
92-
# The friends of the human exposed as a connection with edges
92+
"The friends of the human exposed as a connection with edges"
9393
friendsConnection(first: Int, after: ID): FriendsConnection!
9494
95-
# The movies this human appears in
95+
"The movies this human appears in"
9696
appearsIn: [Episode]!
9797
98-
# A list of starships this person has piloted, or an empty list if none
98+
"A list of starships this person has piloted, or an empty list if none"
9999
starships: [Starship]
100100
}
101101
102-
# An autonomous mechanical character in the Star Wars universe
102+
"An autonomous mechanical character in the Star Wars universe"
103103
type Droid implements Character {
104-
# The ID of the droid
104+
"The ID of the droid"
105105
id: ID!
106106
107-
# What others call this droid
107+
"What others call this droid"
108108
name: String!
109109
110-
# This droid's friends, or an empty list if they have none
110+
"This droid's friends, or an empty list if they have none"
111111
friends: [Character]
112112
113-
# The friends of the droid exposed as a connection with edges
113+
"The friends of the droid exposed as a connection with edges"
114114
friendsConnection(first: Int, after: ID): FriendsConnection!
115115
116-
# The movies this droid appears in
116+
"The movies this droid appears in"
117117
appearsIn: [Episode]!
118118
119-
# This droid's primary function
119+
"This droid's primary function"
120120
primaryFunction: String
121121
}
122122
123-
# A connection object for a character's friends
123+
"A connection object for a character's friends"
124124
type FriendsConnection {
125-
# The total number of friends
125+
"The total number of friends"
126126
totalCount: Int
127127
128-
# The edges for each of the character's friends.
128+
"The edges for each of the character's friends."
129129
edges: [FriendsEdge]
130130
131-
# A list of the friends, as a convenience when edges are not needed.
131+
"A list of the friends, as a convenience when edges are not needed."
132132
friends: [Character]
133133
134-
# Information for paginating this connection
134+
"Information for paginating this connection"
135135
pageInfo: PageInfo!
136136
}
137137
138-
# An edge object for a character's friends
138+
"An edge object for a character's friends"
139139
type FriendsEdge {
140-
# A cursor used for pagination
140+
"A cursor used for pagination"
141141
cursor: ID!
142142
143-
# The character represented by this friendship edge
143+
"The character represented by this friendship edge"
144144
node: Character
145145
}
146146
147-
# Information for paginating this connection
147+
"Information for paginating this connection"
148148
type PageInfo {
149149
startCursor: ID
150150
endCursor: ID
151151
hasNextPage: Boolean!
152152
}
153153
154-
# Represents a review for a movie
154+
"Represents a review for a movie"
155155
type Review {
156-
# The number of stars this review gave, 1-5
156+
"The number of stars this review gave, 1-5"
157157
stars: Int!
158158
159-
# Comment about the movie
159+
"Comment about the movie"
160160
commentary: String
161161
}
162162
163-
# The input object sent when someone is creating a new review
163+
"The input object sent when someone is creating a new review"
164164
input ReviewInput {
165-
# 0-5 stars
165+
"0-5 stars"
166166
stars: Int!
167167
168-
# Comment about the movie, optional
168+
"Comment about the movie, optional"
169169
commentary: String
170170
}
171171
172172
type Starship {
173-
# The ID of the starship
173+
"The ID of the starship"
174174
id: ID!
175175
176-
# The name of the starship
176+
"The name of the starship"
177177
name: String!
178178
179-
# Length of the starship, along the longest axis
179+
"Length of the starship, along the longest axis"
180180
length(unit: LengthUnit = METER): Float
181181
}
182182

0 commit comments

Comments
 (0)