Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1206 from Shopify/ml-add-get-started-readme
Browse files Browse the repository at this point in the history
Update READMEs for GraphQL and Storefront API Client to include Getting Started instructions
  • Loading branch information
melissaluu authored Feb 12, 2024
2 parents 2a4b93d + 6e9dae7 commit 71bda29
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .changeset/honest-walls-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
25 changes: 22 additions & 3 deletions packages/graphql-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,30 @@ The GraphQL Client can be used to interact with any Shopify's GraphQL APIs. Clie


## Getting Started
Using your preferred package manager, install this package in a project:

To install this package, you can run this in your terminal:
```sh
yarn add @shopify/graphql-client
```

```typescript
npm install @shopify/graphql-client
```sh
npm install @shopify/graphql-client --s
```

```sh
pnpm add @shopify/graphql-client
```

### CDN
The UMD builds of each release version are available via the [`unpkg` CDN](https://unpkg.com/browse/@shopify/graphql-client@latest/dist/umd/)

```html
// The minified `v0.9.3` version of the GraphQL API Client
<script src="https://unpkg.com/@shopify/[email protected]/dist/umd/graphql-client.min.js"></script>

<script>
const client = ShopifyGraphQLClient.createGraphQLClient({...});
</script>
```

## Client initialization
Expand Down
28 changes: 28 additions & 0 deletions packages/storefront-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

The Storefront API Client manages the API's authentication information and provides various methods that enables devs to interacts with the API.

## Getting started
Using your preferred package manager, install this package in a project:

```sh
yarn add @shopify/storefront-api-client
```

```sh
npm install @shopify/storefront-api-client --s
```

```sh
pnpm add @shopify/storefront-api-client
```

### CDN
The UMD builds of each release version are available via the [`unpkg` CDN](https://unpkg.com/browse/@shopify/storefront-api-client@latest/dist/umd/)

```html
// The minified `0.2.3` version of the Storefront API Client
<script src="https://unpkg.com/@shopify/[email protected]/dist/umd/storefront-api-client.min.js"></script>


<script>
const client = ShopifyStorefrontAPIClient.createStorefrontApiClient({...});
</script>
```

## Initialization

### Public access token client initialization
Expand Down

0 comments on commit 71bda29

Please sign in to comment.