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.

Last updated