1.1.3 • Published 6 years ago

apollo-link-log v1.1.3

Weekly downloads
155
License
MIT
Repository
github
Last release
6 years ago

apollo-link-log

Log side effect for Apollo Link.

Travis Codecov Status npm package npm downloads

prettier license

Installation

$ yarn add apollo-link-log apollo-link graphql

Usage

import createLogLink from 'apollo-link-log';

// Default
ApolloLink.concat(createLogLink());

// With options
ApolloLink.concat(createLogLink({
  enabled: process.env.NODE_ENV !== 'production',
  logger: ({ operation, operationName, query, variables }) => {...};
}));

Snapshot

npm.io

Options

type Options = {
  enabled?: boolean,
  logger?: (params: {
    operation: Object,
    operationName: ?string,
    query: string,
    variables: Object,
  }) => void,
};

Inspiration

Development

Requirements

  • node >= 11.9.0
  • yarn >= 1.13.0
  • apollo-link ^1.0.0
  • graphql ^14.0.0
$ yarn install --pure-lockfile
$ yarn start

Test

$ yarn run format
$ yarn run eslint
$ yarn run flow
$ yarn run test:watch
$ yarn run build

Publish

$ npm version patch
$ npm run changelog
git commit & push

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests.

CHANGELOG

LICENSE

MIT: http://michaelhsu.mit-license.org

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.0

7 years ago