# Query types

### 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.

{% hint style="info" %}
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.
{% endhint %}

* `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.

&#x20;

All paginable collections are based on the [Relay](https://relay.dev/graphql/connections.htm) 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.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ergonode.com/graphql/overview/query-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
