@aircall/exception-gql
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -7,4 +7,4 @@ type GraphQLException = { | ||
declare const graphQLMiddleware: <T extends (...args: any) => any>(fn: T) => (...args: Parameters<T>) => Promise<GraphQLException | Awaited<ReturnType<T>>>; | ||
declare const graphQLMiddleware: <T extends (...args: any) => any>(fn: T, thisArg?: object) => (...args: Parameters<T>) => Promise<GraphQLException | Awaited<ReturnType<T>>>; | ||
export { GraphQLException, graphQLMiddleware }; |
@@ -11,6 +11,6 @@ 'use strict'; | ||
// src/middleware.ts | ||
var graphQLMiddleware = (fn) => { | ||
var graphQLMiddleware = (fn, thisArg) => { | ||
return async (...args) => { | ||
try { | ||
return await fn.apply(null, args); | ||
return await fn.apply(thisArg, args); | ||
} catch (err) { | ||
@@ -17,0 +17,0 @@ return toGraphQLError(err); |
{ | ||
"name": "@aircall/exception-gql", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"main": "dist/index.js", | ||
@@ -34,3 +34,3 @@ "module": "dist/index.mjs", | ||
"@types/lodash.transform": "4.6.9", | ||
"@aircall/exception": "0.1.0", | ||
"@aircall/exception": "0.1.1", | ||
"@aircall/test-sequencer": "1.0.0", | ||
@@ -52,5 +52,5 @@ "@aircall/tsconfig": "1.4.0", | ||
"size": "size-limit", | ||
"test:ci": "pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --passWithNoTests", | ||
"test:ci": "pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
7591
7
1
95