File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -82,18 +82,18 @@ public function schema($schema = null): Schema
82
82
'name ' => 'Query ' ,
83
83
]);
84
84
85
- $ mutation = $ this -> objectType ( $ schemaMutation, [
86
- 'name ' => 'Mutation ' ,
87
- ]) ;
85
+ $ mutation = $ schemaMutation
86
+ ? $ this -> objectType ( $ schemaMutation , [ 'name ' => 'Mutation ' ])
87
+ : null ;
88
88
89
- $ subscription = $ this -> objectType ( $ schemaSubscription, [
90
- 'name ' => 'Subscription ' ,
91
- ]) ;
89
+ $ subscription = $ schemaSubscription
90
+ ? $ this -> objectType ( $ schemaSubscription , [ 'name ' => 'Subscription ' ])
91
+ : null ;
92
92
93
93
return new Schema ([
94
94
'query ' => $ query ,
95
- 'mutation ' => ! empty ( $ schemaMutation ) ? $ mutation : null ,
96
- 'subscription ' => ! empty ( $ schemaSubscription ) ? $ subscription : null ,
95
+ 'mutation ' => $ mutation ,
96
+ 'subscription ' => $ subscription ,
97
97
'types ' => function () {
98
98
$ types = [];
99
99
You can’t perform that action at this time.
0 commit comments