File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,12 @@ protected function getMergedSchemaFromConfigurations(array $configuration): Sche
160
160
161
161
$ executableSchemas = [];
162
162
163
- $ transforms = [new FlowErrorTransform ()];
163
+ // Determine default error transformer
164
+ if (array_key_exists ('errorTransform ' , $ configuration ) && ! empty ($ configuration ['errorTransform ' ]) && class_exists ($ configuration ['errorTransform ' ])) {
165
+ $ transforms = [new $ configuration ['errorTransform ' ]()];
166
+ } else {
167
+ $ transforms = [new FlowErrorTransform ()];
168
+ }
164
169
165
170
$ options = [
166
171
'typeDefs ' => [],
Original file line number Diff line number Diff line change 28
28
# 'logRequests': true # if enabled all requests are logged
29
29
# 'context:' 'Foo\Vendor\GraphQL\Context # optional context that overrides the global context
30
30
# 'schemaEnvelope': 'Some\Fully\Qualified\Namespace'
31
+ # 'errorTransform': t3n\GraphQL\Transform\FlowErrorTransform # optional: override the default error transformer for this schema
You can’t perform that action at this time.
0 commit comments