Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Commit

Permalink
docs: add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
alias-rahil committed Apr 15, 2021
1 parent d31f2b8 commit 5526239
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### Installation:
```sh
npm i alias-rahil/apollo-winston-logging-plugin # npm i alias-rahil/apollo-winston-logging-plugin#1.0.1
### Usage:
```js
import apolloWinstonLoggingPlugin from 'apollo-winston-logging-plugin';
import { ApolloServer } from 'apollo-server';
import { createLogger } from 'winston';
const logger = createLogger();
new ApolloServer({
plugins: [apolloWinstonLoggingPlugin(logger)],
});
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-winston-logging-plugin",
"version": "1.1.0",
"version": "1.1.1",
"description": "npm package template",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 5526239

Please sign in to comment.