All pages
Powered by GitBook
1 of 2

Loading...

Loading...

Stream queries

List of factors resulting in resource cursor update

Note that some updates though potentially could be interpreted as other resource updates as well, i.e. category name changes could result in updates of both product and category tree cursors, are limited to the specific resource to limit the overall amount of updates.

This is by design since a potentially small change could cause a snowball effect - one, simple category name change, could cause the need to reimport all products in the system, etc.

productStream

  • product created

  • product property updated

    • attribute value

    • product added or removed from a category

    • template assignment

    • status changed

    • a variant has been added or removed

    • grouped product has been added or removed

  • product added to a segment

  • variable product variant added to a segment

  • grouping product grouped product added to a segment

  • product related in product relation attribute added to a segment

attributeStream

  • attribute created

  • attribute property updated

    • name

    • metadata

    • option added, modified, or removed from an attribute

    • unit attribute unit

    • price attribute currency

    • textarea attribute richEdit property

categoryStream

  • category created

  • category property updated

    • name

    • attribute value

categoryTreeStream

  • category tree created

  • category tree property updated

    • name

    • category tree structure

multimediaStream

  • multimedia created

  • multimedia property updated

    • name

    • folder assignment

Query types

Overview of available query and field naming concepts representing how the data is provided.

Single resource

Returns resource identified by the unique inedntifier

  • product(sku: "simple_product") {…} - sku(Sku) for product

  • attribute(code: "attribute_code") {...} - code(AttributeCode) for the attribute

Streams

*Stream (paginable)

Streams allow fetching the collection of resources.

Streams are designed specifically for integrations - once you create a new resource or edit existing ones, a resource is automatically transferred to the end of the stream - a given resource at a given moment is available in the stream only once. The stream gives you the power of importing resources in time without worrying about dealing with nitty-gritty details like edition date etc. As an example, we do have a product stream with the following SKUs [1, 2, 3 {endCursor}]. Once product 2 gets updated the stream will look like the following [1, 3 {endCursorFromInitialState}, 2]. Once you'd add product 4 again the stream would look like [1, 3 {endCursorFromInitialState}, 2, 4]. Thanks to using this powerful design of the cursor approach and our providing method you are sure you don't miss a resource once fetching continuously unlike it's risky on classic paginal collections.

Note if you have an API key created with Segment products are also transferred to the end of the stream once are added to a Segment.

  • productStream(first: 1, after: “cursor”) {…}

Lists

*List (paginable)

Lists allow fetching the collection(list) of the resources.

The list should always be fetched and updated entirely at once. The list represents finite resources not growing in time.

  • languageList(first: 1, after: "cursor") {…}

  • Product.attributeList

Collections

Usually available from other resources levels i.e. bindings of the variable product

  • VariableProduct.bindings

Every API resource is presented in the current state at the moment of fetching.

All paginable collections are based on the Relay standard. According to it every Edge of the graph next to the information of the resource(node) contains a cursor that allows fetching the next resource from the collection.