Include Sentry tracing and additional indexes.
This commit is contained in:
@@ -7,6 +7,7 @@ import { WebSocketLink } from "@apollo/client/link/ws";
|
||||
import { getMainDefinition } from "@apollo/client/utilities";
|
||||
import apolloLogger from "apollo-link-logger";
|
||||
import { auth } from "../firebase/firebase.utils";
|
||||
import { SentryLink } from "apollo-link-sentry";
|
||||
|
||||
const errorLink = onError(
|
||||
({ graphQLErrors, networkError, operation, forward }) => {
|
||||
@@ -106,12 +107,16 @@ const retryLink = new RetryLink({
|
||||
},
|
||||
});
|
||||
|
||||
const sentryLink = new SentryLink();
|
||||
|
||||
const middlewares = [];
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
middlewares.push(apolloLogger);
|
||||
}
|
||||
|
||||
middlewares.push(retryLink.concat(errorLink.concat(authLink.concat(link))));
|
||||
middlewares.push(
|
||||
sentryLink.concat(retryLink.concat(errorLink.concat(authLink.concat(link))))
|
||||
);
|
||||
|
||||
const cache = new InMemoryCache({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user