File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public function schema($schema = null)
46
46
47
47
$ schemaQuery = array_get ($ schema , 'query ' , []);
48
48
$ schemaMutation = array_get ($ schema , 'mutation ' , []);
49
+ $ schemaSubscription = array_get ($ schema , 'subscription ' , []);
49
50
$ schemaTypes = array_get ($ schema , 'types ' , []);
50
51
51
52
//Get the types either from the schema, or the global types.
@@ -71,11 +72,16 @@ public function schema($schema = null)
71
72
$ mutation = $ this ->objectType ($ schemaMutation , [
72
73
'name ' => 'Mutation '
73
74
]);
75
+
76
+ $ subscription = $ this ->objectType ($ schemaSubscription , [
77
+ 'name ' => 'Subscription '
78
+ ]);
74
79
75
80
return new Schema ([
76
- 'query ' => $ query ,
77
- 'mutation ' => !empty ($ schemaMutation ) ? $ mutation : null ,
78
- 'types ' => $ types
81
+ 'query ' => $ query ,
82
+ 'mutation ' => !empty ($ schemaMutation ) ? $ mutation : null ,
83
+ 'subscription ' => !empty ($ schemaSubscription ) ? $ subscription : null ,
84
+ 'types ' => $ types
79
85
]);
80
86
}
81
87
You can’t perform that action at this time.
0 commit comments