Skip to content

Commit

Permalink
Add docs examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ewalk153 committed Jan 23, 2023
1 parent 29b0dd4 commit dc1eb75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/usage/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ response = client.query(query: query, variables: variables)
# do something with the reponse
```

To experiment with prerelease features, pass the api_version unstable when initializing the client.

```ruby
client = ShopifyAPI::Clients::Graphql::Admin.new(session: session, api_version: "unstable")
```

Want to make calls to the Storefront API? Click [here](graphql_storefront.md)

# Proxy a GraphQL Query
Expand Down
6 changes: 6 additions & 0 deletions docs/usage/graphql_storefront.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ response = client.query(query: query)
# do something with the returned data
```

To experiment with prerelease features, pass the api_version unstable when initializing the client.

```ruby
client = ShopifyAPI::Clients::Graphql::Storefront.new(shop_url, storefront_access_token, api_version: "unstable")
```

Want to make calls to the Admin API? Click [here](graphql.md)
7 changes: 7 additions & 0 deletions docs/usage/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ client.post({

_for more information on the `products` endpoint, [check out our API reference guide](https://shopify.dev/api/admin-rest/unstable/resources/product)._

### Override the `api_version`:

```ruby
# To experiment with prerelease features, pass the api_version "unstable".
client = ShopifyAPI::Clients::Rest::Admin.new(session: session, api_version: "unstable")
```

## Pagination

This library also supports cursor-based pagination for REST Admin API requests. [Learn more about REST request pagination](https://shopify.dev/api/usage/pagination-rest).
Expand Down

0 comments on commit dc1eb75

Please sign in to comment.