Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (27 loc) · 1.98 KB

File metadata and controls

44 lines (27 loc) · 1.98 KB

vanilla-graphql-client

An example of calling the Shopify Storefront GraphQL API with no fluff, frameworks, or complexity. This is the simplest way to get started with GraphQL.

This example inspired from the gist shared by @kellyvaughn. Thank you for contributing!

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone https://github.com/Shopify/storefront-api-examples.git
  • cd storefront-api-examples
  • cd vanilla-graphql-client
  • yarn install

Running

Before running create a private app on your test shop and generate a storefront access token.

Pass the shop url and access token as parameters to the example.js script:

$ node example.js https://yourshop.myshopify.com 0e3115ef504f08f57a748208e2833af9

To discover more about our APIs and explore the schema and compose new queries try out the graphiql explorer.

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.