bytheway / go-shopify-graphql-model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-shopify-graphql-model

This is a simple library to help you use Shopify's GraphQL objects in your Go code.

Getting started

  1. Install dependencies

    yarn
  2. Fetch the Shopify graphql schema

    STORE=my-store ACCESS_TOKEN=shpca_xxxxx API_VERSION=2023-07 yarn fetch
  3. Rename or copy its content from result.graphql to schema.graphql

  4. Remove the following declaration from schema.graphql so that models can be generated

    schema {
        query: QueryRoot
        mutation: Mutation
    }
  5. Generate models

    go run main.go 

About

License:MIT License


Languages

Language:Go 77.9%Language:JavaScript 22.1%