@aircall/exception-gql
Advanced tools
Comparing version 0.2.0 to 0.2.3
@@ -7,4 +7,5 @@ type GraphQLException = { | ||
declare const graphQLMiddleware: <T extends (...args: any) => any>(fn: T, thisArg?: object) => (...args: Parameters<T>) => Promise<GraphQLException | Awaited<ReturnType<T>>>; | ||
declare const graphQLMiddleware: <T extends (...args: any) => any>(fn: T, thisArg?: object) => (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>> | GraphQLException>; | ||
declare const toGraphQLException: (err: unknown) => GraphQLException; | ||
export { GraphQLException, graphQLMiddleware }; | ||
export { GraphQLException, graphQLMiddleware, toGraphQLException }; |
@@ -16,7 +16,7 @@ 'use strict'; | ||
} catch (err) { | ||
return toGraphQLError(err); | ||
return toGraphQLException(err); | ||
} | ||
}; | ||
}; | ||
var toGraphQLError = (err) => { | ||
var toGraphQLException = (err) => { | ||
const error = !(err instanceof exception.Exception) ? new exception.GenericException(err?.message) : err; | ||
@@ -38,1 +38,2 @@ return toTypename(error.toJSON()); | ||
exports.graphQLMiddleware = graphQLMiddleware; | ||
exports.toGraphQLException = toGraphQLException; |
{ | ||
"name": "@aircall/exception-gql", | ||
"version": "0.2.0", | ||
"version": "0.2.3", | ||
"main": "dist/index.js", | ||
@@ -19,7 +19,7 @@ "module": "dist/index.mjs", | ||
"path": "dist/index.js", | ||
"limit": "1 KB" | ||
"limit": "6 KB" | ||
}, | ||
{ | ||
"path": "dist/index.mjs", | ||
"limit": "1 KB" | ||
"limit": "6 KB" | ||
} | ||
@@ -35,5 +35,5 @@ ], | ||
"@types/lodash.transform": "4.6.9", | ||
"@aircall/exception": "0.1.1", | ||
"@aircall/test-sequencer": "1.0.0", | ||
"@aircall/tsconfig": "1.4.0", | ||
"@aircall/exception": "0.1.4", | ||
"@aircall/test-sequencer": "1.0.2", | ||
"@aircall/tsconfig": "1.4.2", | ||
"@size-limit/preset-small-lib": "8.1.0", | ||
@@ -51,7 +51,6 @@ "@types/jest": "29.5.2", | ||
"dev": "pnpm build --watch", | ||
"posttest": "pnpm run size", | ||
"size": "size-limit", | ||
"test:ci": "pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --passWithNoTests --silent", | ||
"test:ci": "pnpm run test --shard ${CI_NODE_INDEX}/${CI_NODE_TOTAL} --passWithNoTests --silent", | ||
"test": "jest --passWithNoTests" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7800
68