0.1.5 • Published 10 months ago

apollo-link-trace v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

apollo-link-trace

npm NPM npm Twitter Follow

Apply Trace Context headers to your Apollo Client requests

Install

Via npm

npm install apollo-link-trace

Via Yarn

yarn add apollo-link-trace

How to use

TraceContextLink accepts an options object that allows you to pass options when creating the link.

Options

tracestate - Default tracestate header to use for requests. This can be overridden via individual call contexts.

Example

import { ApolloClient, HttpLink, InMemoryCache, from } from '@apollo/client'
import { TraceContextLink } from 'apollo-link-trace'

const apolloClient = new ApolloClient({
  link: from([
    new TraceContextLink(),
    new HttpLink({
      uri: graphqlEndpoint,
    })
  ]),
  cache: new InMemoryCache(),
});

License

MIT © Ryan Hefner

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago