@@ -103,20 +103,20 @@ const characterInterface = new GraphQLInterfaceType({
103
103
description : 'A character in the Star Wars Trilogy' ,
104
104
fields : ( ) => ( {
105
105
id : {
106
- type : GraphQLNonNull ( GraphQLString ) ,
106
+ type : new GraphQLNonNull ( GraphQLString ) ,
107
107
description : 'The id of the character.' ,
108
108
} ,
109
109
name : {
110
110
type : GraphQLString ,
111
111
description : 'The name of the character.' ,
112
112
} ,
113
113
friends : {
114
- type : GraphQLList ( characterInterface ) ,
114
+ type : new GraphQLList ( characterInterface ) ,
115
115
description :
116
116
'The friends of the character, or an empty list if they have none.' ,
117
117
} ,
118
118
appearsIn : {
119
- type : GraphQLList ( episodeEnum ) ,
119
+ type : new GraphQLList ( episodeEnum ) ,
120
120
description : 'Which movies they appear in.' ,
121
121
} ,
122
122
secretBackstory : {
@@ -155,21 +155,21 @@ const humanType = new GraphQLObjectType({
155
155
description : 'A humanoid creature in the Star Wars universe.' ,
156
156
fields : ( ) => ( {
157
157
id : {
158
- type : GraphQLNonNull ( GraphQLString ) ,
158
+ type : new GraphQLNonNull ( GraphQLString ) ,
159
159
description : 'The id of the human.' ,
160
160
} ,
161
161
name : {
162
162
type : GraphQLString ,
163
163
description : 'The name of the human.' ,
164
164
} ,
165
165
friends : {
166
- type : GraphQLList ( characterInterface ) ,
166
+ type : new GraphQLList ( characterInterface ) ,
167
167
description :
168
168
'The friends of the human, or an empty list if they have none.' ,
169
169
resolve : ( human ) => getFriends ( human ) ,
170
170
} ,
171
171
appearsIn : {
172
- type : GraphQLList ( episodeEnum ) ,
172
+ type : new GraphQLList ( episodeEnum ) ,
173
173
description : 'Which movies they appear in.' ,
174
174
} ,
175
175
homePlanet : {
@@ -205,21 +205,21 @@ const droidType = new GraphQLObjectType({
205
205
description : 'A mechanical creature in the Star Wars universe.' ,
206
206
fields : ( ) => ( {
207
207
id : {
208
- type : GraphQLNonNull ( GraphQLString ) ,
208
+ type : new GraphQLNonNull ( GraphQLString ) ,
209
209
description : 'The id of the droid.' ,
210
210
} ,
211
211
name : {
212
212
type : GraphQLString ,
213
213
description : 'The name of the droid.' ,
214
214
} ,
215
215
friends : {
216
- type : GraphQLList ( characterInterface ) ,
216
+ type : new GraphQLList ( characterInterface ) ,
217
217
description :
218
218
'The friends of the droid, or an empty list if they have none.' ,
219
219
resolve : ( droid ) => getFriends ( droid ) ,
220
220
} ,
221
221
appearsIn : {
222
- type : GraphQLList ( episodeEnum ) ,
222
+ type : new GraphQLList ( episodeEnum ) ,
223
223
description : 'Which movies they appear in.' ,
224
224
} ,
225
225
secretBackstory : {
@@ -270,7 +270,7 @@ const queryType = new GraphQLObjectType({
270
270
args : {
271
271
id : {
272
272
description : 'id of the human' ,
273
- type : GraphQLNonNull ( GraphQLString ) ,
273
+ type : new GraphQLNonNull ( GraphQLString ) ,
274
274
} ,
275
275
} ,
276
276
resolve : ( _source , { id } ) => getHuman ( id ) ,
@@ -280,7 +280,7 @@ const queryType = new GraphQLObjectType({
280
280
args : {
281
281
id : {
282
282
description : 'id of the droid' ,
283
- type : GraphQLNonNull ( GraphQLString ) ,
283
+ type : new GraphQLNonNull ( GraphQLString ) ,
284
284
} ,
285
285
} ,
286
286
resolve : ( _source , { id } ) => getDroid ( id ) ,
0 commit comments