Constructor
new Client(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Config | An instance of Config used to configure the Client. |
Properties:
Name | Type | Description |
---|---|---|
product |
ProductResource | The property under which product fetching methods live. |
collection |
CollectionResource | The property under which collection fetching methods live. |
shop |
ShopResource | The property under which shop fetching methods live. |
checkout |
CheckoutResource | The property under which shop fetching and mutating methods live. |
image |
ImageResource | The property under which image helper methods live. |
Methods
(static) buildClient()
Primary entry point for building a new Client.
fetchNextPage(Arrayopt) → {Promise|Array.<GraphModel>}
Fetches the next page of models
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
Array |
models |
<optional> |
The paginated set to fetch the next page of |
Returns:
A promise resolving with an array of GraphModel
s of the type provided.
- Type
- Promise | Array.<GraphModel>
Example
client.fetchNextPage(products).then((nextProducts) => {
// Do something with the products
});