Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aerogear/apollo-voyager-audit

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aerogear/apollo-voyager-audit - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

dist/auditLog.d.ts
import { GraphQLResolveInfo } from 'graphql';
export declare function auditLog(success: boolean, request: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string): void;
export declare function auditLog(success: boolean, context: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string): void;

@@ -10,6 +10,6 @@ "use strict";

const auditLogger = log.child({ tag: 'AUDIT' });
function auditLog(success, request, info, parent, args, msg) {
function auditLog(success, context, info, parent, args, msg) {
auditLogger.info({
msg: msg || '',
requestId: request ? request.id : '',
requestId: context && context.request ? context.request.id : '',
operationType: info.operation.operation,

@@ -22,3 +22,5 @@ fieldName: info.fieldName,

arguments: args,
clientInfo: request && request.body && request.body.extensions && request.body.extensions.metrics || undefined
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
});

@@ -25,0 +27,0 @@ }

{
"name": "@aerogear/apollo-voyager-audit",
"version": "0.1.3",
"version": "0.1.4",
"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.3",
"@aerogear/apollo-voyager-tools": "^0.1.4",
"graphql-tools": "^4.0.3",

@@ -27,0 +27,0 @@ "pino": "^5.9.0"

@@ -17,2 +17,4 @@ import { buildPath } from '@aerogear/apollo-voyager-tools'

clientInfo: any
authenticated: boolean
userInfo: any
}): void

@@ -24,6 +26,6 @@ }

export function auditLog (success: boolean, request: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string) {
export function auditLog (success: boolean, context: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string) {
auditLogger.info({
msg: msg || '',
requestId: request ? request.id : '',
requestId: context && context.request ? context.request.id : '',
operationType: info.operation.operation,

@@ -36,4 +38,6 @@ fieldName: info.fieldName,

arguments: args,
clientInfo: request && request.body && request.body.extensions && request.body.extensions.metrics || undefined
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc