-
Notifications
You must be signed in to change notification settings - Fork 13
Miss configured sourcemaps ? #9
Copy link
Copy link
Open
Description
On a project created with create-react-app, I get the following error when starting or building the app:
Incriminated code:
// src/config/apollo-client.ts
import { ApolloClient, createHttpLink } from "@apollo/client";
import { setContext } from "@apollo/client/link/context";
import { createPersistedQueryLink } from "@apollo/client/link/persisted-queries";
import { usePregeneratedHashes } from "graphql-codegen-persisted-query-ids/lib/apollo";
import hashes from "../gql/persisted-query-ids/client.json";
import { apolloCache } from "./apollo-cache";
export default function initApolloClient(session: any) {
const httpLink = createHttpLink({
uri: window.ENV.GRAPHQL_SERVER_URL,
});
const authLink = setContext((_, { headers }) => {
return {
headers: {
...headers,
authorization: `Bearer ${session.appToken}`,
},
};
});
const persistedQueryLink = createPersistedQueryLink({
useGETForHashedQueries: false,
// eslint-disable-next-line
generateHash: usePregeneratedHashes(hashes),
});
return new ApolloClient({
link: authLink.concat(persistedQueryLink).concat(httpLink),
cache: apolloCache,
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
