We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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, }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
On a project created with create-react-app, I get the following error when starting or building the app:
Incriminated code:
The text was updated successfully, but these errors were encountered: