apollo-link-printer
v1.0.0
Published
Pretty logger of Apollo GraphQL network operations packaged in a Apollo link
Downloads
84
Maintainers
Readme
Apollo link Printer
Pretty logger of Apollo GraphQL network operations
Preview
Installation
Node Package Manager installation
npm install apollo-link-printer
Yarn installation
yarn add apollo-link-printer
Usage
import { PrinterLink } from 'apollo-link-printer';
// See options
const options = {
print: true,
}
const client = new ApolloClient({
link: ApolloLink.from([
new PrinterLink(options),
new HttpLink({ uri: 'http://localhost:4000' }),
]),
cache: new InMemoryCache(),
});
Options
TBA
Contributing
This project uses TypeScript to bring static types to JavaScript and uses Jest for testing. To get started, clone the repo and run the following commands:
npm install # or `yarn`
npm run check-types # or `yarn check-types` to check TypeScript types
To run the library locally in another project, you can do the following:
npm link
# in the project you want to run this in
npm link apollo-link-rest