Catalog/GraphQL

Catalog/GraphQL

Source:

Catalog-related GraphQL resolvers

Methods

(static) CartItem/productTags(cartItem, connectionArgs, context, info) → {Promise.<Array.<Object>>}

Returns the tags for a CartItem

Source:
Parameters:
Name Type Description
cartItem Object

CartItem from parent resolver

connectionArgs TagConnectionArgs

arguments sent by the client See default connection arguments

context Object

an object containing the per-request state

info Object

Info about the GraphQL request

Returns:

Promise that resolves with array of Tag objects

Type
Promise.<Array.<Object>>

(static) CatalogProduct/tagIds(product) → {Array.<String>}

Returns the product tagIds prop to opaque IDs

Source:
Parameters:
Name Type Description
product Object

CatalogProduct response from parent resolver

Returns:

Array of tag IDs

Type
Array.<String>

(static) CatalogProduct/tags(product, connectionArgs, context, info) → {Promise.<Array.<Object>>}

Returns the tags for a product

Source:
Parameters:
Name Type Description
product Object

CatalogProduct response from parent resolver

connectionArgs TagConnectionArgs

arguments sent by the client See default connection arguments

context Object

an object containing the per-request state

info Object

Info about the GraphQL request

Returns:

Promise that resolves with array of Tag objects

Type
Promise.<Array.<Object>>

(static) OrderItem/productTags(orderItem, connectionArgs, context, info) → {Promise.<Array.<Object>>}

Returns the tags for an OrderItem

Source:
Parameters:
Name Type Description
orderItem Object

OrderItem from parent resolver

connectionArgs TagConnectionArgs

arguments sent by the client See default connection arguments

context Object

an object containing the per-request state

info Object

Info about the GraphQL request

Returns:

Promise that resolves with array of Tag objects

Type
Promise.<Array.<Object>>

(static) Query/catalogItems(_, args, context, info) → {Promise.<Object>}

Get a list of catalogItems

Source:
Parameters:
Name Type Description
_ Object

unused

args ConnectionArgs

an object of all arguments that were sent by the client

Properties
Name Type Attributes Description
shopIds Array.<String> <optional>

limit to catalog items for these shops

tagIds Array.<String> <optional>

limit to catalog items with this array of tags

booleanFilters Array.<Object> <optional>

Array of boolean filter objects with name and value

context Object

an object containing the per-request state

info Object

Info about the GraphQL request

Returns:

A CatalogItemConnection object

Type
Promise.<Object>