File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,19 @@ const humanType = new GraphQLObjectType({
177
177
type : GraphQLString ,
178
178
description : 'The home planet of the human, or null if unknown.' ,
179
179
} ,
180
+ secretFriend : {
181
+ type : GraphQLString ,
182
+ description : 'A friend of the human whose identity should remain hidden.' ,
183
+ resolve ( ) {
184
+ return new Promise ( resolve => {
185
+ setTimeout ( ( ) => {
186
+ resolve ( ) ;
187
+ } , 10 ) ;
188
+ } ) . then ( ( ) => {
189
+ throw new Error ( 'secretFriend is secret.' ) ;
190
+ } ) ;
191
+ } ,
192
+ } ,
180
193
secretBackstory : {
181
194
type : GraphQLString ,
182
195
description : 'Where are they from and how they came to be who they are.' ,
@@ -297,3 +310,9 @@ export const StarWarsSchema: GraphQLSchema = new GraphQLSchema({
297
310
query : queryType ,
298
311
types : [ humanType , droidType ] ,
299
312
} ) ;
313
+
314
+ export const StarWarsSchemaDeferEnabled = new GraphQLSchema ( {
315
+ query : queryType ,
316
+ types : [ humanType , droidType ] ,
317
+ experimentalDeferFragmentSpreads : true ,
318
+ } ) ;
You can’t perform that action at this time.
0 commit comments