1.0.2 • Published 8 months ago

@eastsideco/shopify-graphql-schema v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@eastsideco/shopify-graphql-schema

Generated GraphQL Schema files for Shopify's GraphQL APIs.

Useful for running codegen against Shopify's GraphQL schema without needing live app credentials to run introspection queries.

Usage

All versions since 2020-01 are supported.

Each version of the Admin API schema is provided under node_modules/@eastsideco/shopify-graphql-schemas/versions/admin/.

VersionImport
Admin API 2023-01@eastsideco/shopify-graphql-schema/versions/admin/2023-01.graphql
Admin API 2023-04@eastsideco/shopify-graphql-schema/versions/admin/2023-04.graphql
Admin API 2023-07@eastsideco/shopify-graphql-schema/versions/admin/2023-07.graphql

The Storefront API and Payments Apps API are also supported:

VersionImport
Storefront API 2023-01@eastsideco/shopify-graphql-schema/versions/storefront/2023-01.graphql
Payments Apps API 2023-01@eastsideco/shopify-graphql-schema/versions/payments_apps/2023-01.graphql

JSON versions of the schemas (JSON introspection responses) are also available - just change .graphql to .json.

Example using @graphql-codegen/cli

// codegen.ts

import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
    schema: `node_modules/@eastsideco/shopify-graphql-schema/versions/admin/2023-07.graphql`,
    documents: ['src/**/*.tsx'],
    ignoreNoDocuments: true,
    generates: {
        './src/gql/': {
            preset: 'client'
        }
    }
};

export default config;

You may need to adjust the schema path to reflect the location of your node_modules folder compared to your codegen.ts.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago