Skip to content

Commit affc6f9

Browse files
mandiwisebenjie
andcommitted
Update introspection docs (graphql#1812)
Co-authored-by: Benjie <[email protected]>
1 parent e257efc commit affc6f9

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,157 +28,157 @@ 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
updateHumanName(id: ID!, name: String!): Human
3535
deleteStarship(id: ID!): ID
3636
}
3737
38-
# The episodes in the Star Wars trilogy
38+
"The episodes in the Star Wars trilogy"
3939
enum Episode {
40-
# Star Wars Episode IV: A New Hope, released in 1977.
40+
"Star Wars Episode IV: A New Hope, released in 1977."
4141
NEWHOPE
4242
43-
# Star Wars Episode V: The Empire Strikes Back, released in 1980.
43+
"Star Wars Episode V: The Empire Strikes Back, released in 1980."
4444
EMPIRE
4545
46-
# Star Wars Episode VI: Return of the Jedi, released in 1983.
46+
"Star Wars Episode VI: Return of the Jedi, released in 1983."
4747
JEDI
4848
}
4949
50-
# A character from the Star Wars universe
50+
"A character from the Star Wars universe"
5151
interface Character {
52-
# The ID of the character
52+
"The ID of the character"
5353
id: ID!
5454
55-
# The name of the character
55+
"The name of the character"
5656
name: String!
5757
58-
# The friends of the character, or an empty list if they have none
58+
"The friends of the character, or an empty list if they have none"
5959
friends: [Character]
6060
61-
# The friends of the character exposed as a connection with edges
61+
"The friends of the character exposed as a connection with edges"
6262
friendsConnection(first: Int, after: ID): FriendsConnection!
6363
64-
# The movies this character appears in
64+
"The movies this character appears in"
6565
appearsIn: [Episode]!
6666
}
6767
68-
# Units of height
68+
"Units of height"
6969
enum LengthUnit {
70-
# The standard unit around the world
70+
"The standard unit around the world"
7171
METER
7272
73-
# Primarily used in the United States
73+
"Primarily used in the United States"
7474
FOOT
7575
}
7676
77-
# A humanoid creature from the Star Wars universe
77+
"A humanoid creature from the Star Wars universe"
7878
type Human implements Character {
79-
# The ID of the human
79+
"The ID of the human"
8080
id: ID!
8181
82-
# What this human calls themselves
82+
"What this human calls themselves"
8383
name: String!
8484
85-
# Height in the preferred unit, default is meters
85+
"Height in the preferred unit, default is meters"
8686
height(unit: LengthUnit = METER): Float
8787
88-
# Mass in kilograms, or null if unknown
88+
"Mass in kilograms, or null if unknown"
8989
mass: Float
9090
91-
# This human's friends, or an empty list if they have none
91+
"This human's friends, or an empty list if they have none"
9292
friends: [Character]
9393
94-
# The friends of the human exposed as a connection with edges
94+
"The friends of the human exposed as a connection with edges"
9595
friendsConnection(first: Int, after: ID): FriendsConnection!
9696
97-
# The movies this human appears in
97+
"The movies this human appears in"
9898
appearsIn: [Episode]!
9999
100-
# A list of starships this person has piloted, or an empty list if none
100+
"A list of starships this person has piloted, or an empty list if none"
101101
starships: [Starship]
102102
}
103103
104-
# An autonomous mechanical character in the Star Wars universe
104+
"An autonomous mechanical character in the Star Wars universe"
105105
type Droid implements Character {
106-
# The ID of the droid
106+
"The ID of the droid"
107107
id: ID!
108108
109-
# What others call this droid
109+
"What others call this droid"
110110
name: String!
111111
112-
# This droid's friends, or an empty list if they have none
112+
"This droid's friends, or an empty list if they have none"
113113
friends: [Character]
114114
115-
# The friends of the droid exposed as a connection with edges
115+
"The friends of the droid exposed as a connection with edges"
116116
friendsConnection(first: Int, after: ID): FriendsConnection!
117117
118-
# The movies this droid appears in
118+
"The movies this droid appears in"
119119
appearsIn: [Episode]!
120120
121-
# This droid's primary function
121+
"This droid's primary function"
122122
primaryFunction: String
123123
}
124124
125-
# A connection object for a character's friends
125+
"A connection object for a character's friends"
126126
type FriendsConnection {
127-
# The total number of friends
127+
"The total number of friends"
128128
totalCount: Int
129129
130-
# The edges for each of the character's friends.
130+
"The edges for each of the character's friends."
131131
edges: [FriendsEdge]
132132
133-
# A list of the friends, as a convenience when edges are not needed.
133+
"A list of the friends, as a convenience when edges are not needed."
134134
friends: [Character]
135135
136-
# Information for paginating this connection
136+
"Information for paginating this connection"
137137
pageInfo: PageInfo!
138138
}
139139
140-
# An edge object for a character's friends
140+
"An edge object for a character's friends"
141141
type FriendsEdge {
142-
# A cursor used for pagination
142+
"A cursor used for pagination"
143143
cursor: ID!
144144
145-
# The character represented by this friendship edge
145+
"The character represented by this friendship edge"
146146
node: Character
147147
}
148148
149-
# Information for paginating this connection
149+
"Information for paginating this connection"
150150
type PageInfo {
151151
startCursor: ID
152152
endCursor: ID
153153
hasNextPage: Boolean!
154154
}
155155
156-
# Represents a review for a movie
156+
"Represents a review for a movie"
157157
type Review {
158-
# The number of stars this review gave, 1-5
158+
"The number of stars this review gave, 1-5"
159159
stars: Int!
160160
161-
# Comment about the movie
161+
"Comment about the movie"
162162
commentary: String
163163
}
164164
165-
# The input object sent when someone is creating a new review
165+
"The input object sent when someone is creating a new review"
166166
input ReviewInput {
167-
# 0-5 stars
167+
"0-5 stars"
168168
stars: Int!
169169
170-
# Comment about the movie, optional
170+
"Comment about the movie, optional"
171171
commentary: String
172172
}
173173
174174
type Starship {
175-
# The ID of the starship
175+
"The ID of the starship"
176176
id: ID!
177177
178-
# The name of the starship
178+
"The name of the starship"
179179
name: String!
180180
181-
# Length of the starship, along the longest axis
181+
"Length of the starship, along the longest axis"
182182
length(unit: LengthUnit = METER): Float
183183
}
184184

0 commit comments

Comments
 (0)