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

@lightspeed/apollo-logging-extension

Package Overview
Dependencies
Maintainers
8
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightspeed/apollo-logging-extension

Standard output logging extension for Apollo GraphQL services

  • 0.2.13
  • latest
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

@lightspeed/apollo-logging-extension

npm version

Introduction

Standard output logging extension for GraphQL services. Logs the request operation, query, arguments, errors, and tracing information overall and per field.

Quick Start

  1. Install the dependency in your webapp.
yarn add apollo-server-express @lightspeed/apollo-logging-extension
  1. Enable the extension and tracing in your Apollo server configuration. As a best practice, pass in the version and name of your service.
// server.ts
import ApolloLoggingExtension from '@lightspeed/apollo-logging-extension';

const { name, version } = require('./package.json');

const server = new ApolloServer({
  // ...
  extensions: [() => new ApolloLoggingExtension({ name, version })],
  tracing: true,
});
  1. Optionally, enable variables logging for debugging purpose. This is explicitely turned off by default to prevent logging sensible information going through the GraphQL layer:
// server.ts
import ApolloLoggingExtension from '@lightspeed/apollo-logging-extension';

const { name, version } = require('./package.json');

const server = new ApolloServer({
  // ...
  extensions: [
    () =>
      new ApolloLoggingExtension({
        name,
        version,
        logVariables: process.env.NODE_CONFIG_ENV === 'development',
      }),
  ],
  tracing: true,
});

FAQs

Package last updated on 26 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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