UNPKG

722 BJavaScriptView Raw
1import { InvariantError } from "../../utilities/globals/index.js";
2export var checkFetcher = function (fetcher) {
3 if (!fetcher && typeof fetch === 'undefined') {
4 throw __DEV__ ? new InvariantError("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n ") : new InvariantError(23);
5 }
6};
7//# sourceMappingURL=checkFetcher.js.map
\No newline at end of file