| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | function formatError(GraphQLException $error): array |
||
| 13 | { |
||
| 14 | invariant(null !== $error, 'Received null error.'); |
||
| 15 | |||
| 16 | return array_merge($error->getExtensions() ?? [], [ |
||
| 17 | 'message' => $error->getMessage(), |
||
| 18 | 'locations' => $error->getLocationsAsArray(), |
||
| 19 | 'path' => $error->getPath(), |
||
| 20 | ]); |
||
| 22 |