This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1206 from Shopify/ml-add-get-started-readme
Update READMEs for GraphQL and Storefront API Client to include Getting Started instructions
- Loading branch information
Showing
3 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|