(error: Error)
| 27 | }; |
| 28 | |
| 29 | const formatErrorPayload = (error: Error): string => { |
| 30 | if (error instanceof WebinyError) { |
| 31 | return JSON.stringify({ |
| 32 | type: "CoreGraphQLWebinyError", |
| 33 | message: error.message, |
| 34 | code: error.code, |
| 35 | data: error.data, |
| 36 | stack: error.stack |
| 37 | }); |
| 38 | } |
| 39 | |
| 40 | return JSON.stringify({ |
| 41 | type: "Error", |
| 42 | name: error.name, |
| 43 | message: error.message, |
| 44 | stack: error.stack |
| 45 | }); |
| 46 | }; |
| 47 | |
| 48 | export default (options: HandlerGraphQLOptions = {}): Plugin[] => { |
| 49 | let schema: GraphQLSchema | undefined = undefined; |
no outgoing calls
no test coverage detected