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!
You will need the following things properly installed on your computer.
git clone https://github.com/Shopify/storefront-api-examples.git
cd storefront-api-examples
cd vanilla-graphql-client
yarn install
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.
For help on setting up the repo locally, building, testing, and contributing please see CONTRIBUTING.md.
All developers who wish to contribute through code or issues, take a look at the CODE_OF_CONDUCT.md.
MIT, see LICENSE for details.