0.1.2 • Published 6 years ago

apollo-trace-viz v0.1.2

Weekly downloads
6
License
-
Repository
-
Last release
6 years ago

Usage

yarn add apollo-trace-viz

Ensure your graphql server is returning valid apollo-trace extensions. Then pass the response to apollo-trace-viz.

And it'll print a visualization of your response. After drawing the visuals to the console it returns the response so you can chain it with other promise handlers.

screenshot

Example

const viz = require('apollo-trace-viz')
const { GraphQLClient } = require('graphql-request')

const client = new GraphQLClient('https://fakerql.com/graphql', {
  headers: {
    'x-apollo-tracing': 1,
  },
})

client
  .rawRequest(
    `{
      allUsers {
        id
      }
      }`,
  )
  .then(viz)
  .catch(console.error)
0.1.2

6 years ago

0.1.1

6 years ago