A collection of apollo links used to help debug GraphQL requests and responses.
See the individual packages for more information:
- @apollo-link-debug/handle-abort – log when a GraphQL request has been cancelled.
- @apollo-link-debug/handle-aws-x-ray - log the unique URL for a GraphQL request to an AWS service implementing X-Ray.
- @apollo-link-debug/handle-errors – debug public-facing errors returned from the GraphQL server.
- @apollo-link-debug/handle-request – debug the operation name and variables used for a GraphQL request.
- @apollo-link-debug/handle-timer – debug the duration of an operation.
Install the individual package(s) that you would like to use and connect them to your apollo client.
npm i \
@apollo-link-debug/handle-request \
@apollo-link-debug/handle-errors
# - or -
yarn add \
@apollo-link-debug/handle-request \
@apollo-link-debug/handle-errorsimport { ApolloClient, ApolloLink, InMemoryCache } from "@apollo/client";
import { createRequestLink } from "@apollo-link-debug/handle-request";
import { createErrorsLink } from "@apollo-link-debug/handle-errors";
const client = new ApolloClient({
uri: "https://localhost:3000/",
cache: new InMemoryCache(),
link: ApolloLink.from([createRequestLink(), createErrorsLink()]),
});