@aerogear/apollo-voyager-audit
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -12,14 +12,16 @@ "use strict"; | ||
auditLogger.info({ | ||
msg: msg || '', | ||
requestId: context && context.request ? context.request.id : '', | ||
operationType: info.operation.operation, | ||
fieldName: info.fieldName, | ||
parentTypeName: info.parentType.name, | ||
path: apollo_voyager_tools_1.buildPath(info.path), | ||
success, | ||
parent, | ||
arguments: args, | ||
clientInfo: context && context.request && context.request.body && context.request.body.extensions && context.request.body.extensions.metrics || undefined, | ||
authenticated: !!(context && context.auth && context.auth.isAuthenticated()), | ||
userInfo: (context && context.auth && context.auth.accessToken) ? context.auth.accessToken.content : undefined | ||
audit: { | ||
msg: msg || '', | ||
requestId: context && context.request ? context.request.id : '', | ||
operationType: info.operation.operation, | ||
fieldName: info.fieldName, | ||
parentTypeName: info.parentType.name, | ||
path: apollo_voyager_tools_1.buildPath(info.path), | ||
success, | ||
parent, | ||
arguments: args, | ||
clientInfo: context && context.request && context.request.body && context.request.body.extensions && context.request.body.extensions.metrics || undefined, | ||
authenticated: !!(context && context.auth && context.auth.isAuthenticated()), | ||
userInfo: (context && context.auth && context.auth.accessToken) ? context.auth.accessToken.content : undefined | ||
} | ||
}); | ||
@@ -26,0 +28,0 @@ } |
{ | ||
"name": "@aerogear/apollo-voyager-audit", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Adds audit logging capabilities to Apollo Voyager Server.", | ||
@@ -24,3 +24,3 @@ "author": "AeroGear Team<aerogear@googlegroups.com>", | ||
"dependencies": { | ||
"@aerogear/apollo-voyager-tools": "^0.1.6", | ||
"@aerogear/apollo-voyager-tools": "^0.1.7", | ||
"graphql-tools": "^4.0.3", | ||
@@ -27,0 +27,0 @@ "pino": "^5.9.0" |
@@ -7,14 +7,16 @@ import { buildPath } from '@aerogear/apollo-voyager-tools' | ||
info (log: { | ||
msg: string | ||
requestId: string | ||
operationType: string | ||
fieldName: string | ||
parentTypeName: string | ||
path: string | ||
success: boolean | ||
parent: any | ||
arguments: any | ||
clientInfo: any | ||
authenticated: boolean | ||
userInfo: any | ||
audit: { | ||
msg: string | ||
requestId: string | ||
operationType: string | ||
fieldName: string | ||
parentTypeName: string | ||
path: string | ||
success: boolean | ||
parent: any | ||
arguments: any | ||
clientInfo: any | ||
authenticated: boolean | ||
userInfo: any | ||
} | ||
}): void | ||
@@ -28,15 +30,17 @@ } | ||
auditLogger.info({ | ||
msg: msg || '', | ||
requestId: context && context.request ? context.request.id : '', | ||
operationType: info.operation.operation, | ||
fieldName: info.fieldName, | ||
parentTypeName: info.parentType.name, | ||
path: buildPath(info.path), | ||
success, | ||
parent, | ||
arguments: args, | ||
clientInfo: context && context.request && context.request.body && context.request.body.extensions && context.request.body.extensions.metrics || undefined, | ||
authenticated: !!(context && context.auth && context.auth.isAuthenticated()), | ||
userInfo: (context && context.auth && context.auth.accessToken) ? context.auth.accessToken.content : undefined | ||
audit: { | ||
msg: msg || '', | ||
requestId: context && context.request ? context.request.id : '', | ||
operationType: info.operation.operation, | ||
fieldName: info.fieldName, | ||
parentTypeName: info.parentType.name, | ||
path: buildPath(info.path), | ||
success, | ||
parent, | ||
arguments: args, | ||
clientInfo: context && context.request && context.request.body && context.request.body.extensions && context.request.body.extensions.metrics || undefined, | ||
authenticated: !!(context && context.auth && context.auth.isAuthenticated()), | ||
userInfo: (context && context.auth && context.auth.accessToken) ? context.auth.accessToken.content : undefined | ||
} | ||
}) | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6843
100