MCPcopy
hub / github.com/redwoodjs/graphql / enhanceError

Function enhanceError

packages/web/src/apollo/links.ts:27–38  ·  view source on GitHub ↗
(operation: Operation, error: any)

Source from the content-addressed store, hash-verified

25}
26
27function enhanceError(operation: Operation, error: any) {
28 const { operationName, query, variables } = operation
29
30 error.__RedwoodEnhancedError = {
31 operationName,
32 operationKind: query?.kind.toString(),
33 variables,
34 query: query && print(query),
35 }
36
37 return error
38}
39
40export function createUpdateDataLink() {
41 return new ApolloLink((operation, forward) => {

Callers 2

nextFunction · 0.85
errorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected