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 @@ -172,6 +172,19 @@ const humanType = new GraphQLObjectType({
172
172
type : GraphQLString ,
173
173
description : 'The home planet of the human, or null if unknown.' ,
174
174
} ,
175
+ secretFriend : {
176
+ type : GraphQLString ,
177
+ description : 'A friend of the human whose identity should remain hidden.' ,
178
+ resolve ( ) {
179
+ return new Promise ( resolve => {
180
+ setTimeout ( ( ) => {
181
+ resolve ( ) ;
182
+ } , 10 ) ;
183
+ } ) . then ( ( ) => {
184
+ throw new Error ( 'secretFriend is secret.' ) ;
185
+ } ) ;
186
+ } ,
187
+ } ,
175
188
secretBackstory : {
176
189
type : GraphQLString ,
177
190
description : 'Where are they from and how they came to be who they are.' ,
@@ -292,3 +305,9 @@ export const StarWarsSchema = new GraphQLSchema({
292
305
query : queryType ,
293
306
types : [ humanType , droidType ] ,
294
307
} ) ;
308
+
309
+ export const StarWarsSchemaDeferEnabled = new GraphQLSchema ( {
310
+ query : queryType ,
311
+ types : [ humanType , droidType ] ,
312
+ experimentalDeferFragmentSpreads : true ,
313
+ } ) ;
You can’t perform that action at this time.
0 commit comments