Shopify / storefront-api-examples

Example custom storefront applications built on Shopify's Storefront API
https://help.shopify.com/api/storefront-api
MIT License
1.12k stars 329 forks source link

Node fetch is needed for example react-apollo #105

Closed SylarRuby closed 4 years ago

SylarRuby commented 4 years ago

On first implementation, I received the following

fetch is not found globally and no fetcher passed, to fix pass a fetch for your environment like https://www.npmjs.com/package/node-fetch.

Which gives an example:

import fetch from 'node-fetch';
import { createHttpLink } from 'apollo-link-http';

const link = createHttpLink({ uri: '/graphql', fetch: fetch });

Thought I'll share this.