Skip to content

Latest commit

 

History

History
 
 

node-graphql-client

node-graphql-client

An example using graphql-js-client built with Node, Express and Pug. This example uses babel-plugin-graphql-js-client-transform in conjunction with graphql-js-client to build queries.

Prerequisites

Installation

git clone https://github.com/Shopify/storefront-api-examples.git
cd node-js-buy
yarn install

Configuring

If you would like to connect your store to this example, open up src/graphql-js-client.js and update the url and Authorization header:

export default new Client(typeBundle, {
  url: 'https://your-shop-name.myshopify.com/api/graphql',
  fetcherOptions: {
    headers: {
      'X-Shopify-Storefront-Access-Token': 'your-storefront-access-token'
    }
  }
});

Running

Contributing

For help on setting up the repo locally, building, testing, and contributing please see CONTRIBUTING.md.

Code of Conduct

All developers who wish to contribute through code or issues, take a look at the CODE_OF_CONDUCT.md.

License

MIT, see LICENSE for details.