apollo-logger-link
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

HERO

Simple yet powerfull logger link for your apollo client.

Usage

import { ApolloLink, ApolloClient, InMemoryCache } from '@apollo/client'
import { loggerLink } from 'apollo-logger-link'

const logger = loggerLink(op => op.getContext().schemaName)

const apolloClient = new ApolloClient({
  link: ApolloLink.from([logger, new HttpLink({ uri: '/graphql' })]),
  cache: new InMemoryCache()
})

Readme

Keywords

none

Package Sidebar

Install

npm i apollo-logger-link

Weekly Downloads

105

Version

2.0.1

License

Apache-2.0

Unpacked Size

16.6 kB

Total Files

5

Last publish

Collaborators

  • dempfi
  • aleksandr.lesnenko