Schemas
This article describes how schemas are used for objects and arrays in GraphChain. It's important to read data-types.md and have a basic understanding of types theory before reading this.
Objects
Generally in GraphChain, every object has a schema. The schema may be empty, meaning any object is accepted, or, the way it's more widely used, it may be specified. The object on the screenshot has schema, because its attributes are specified, and you can see it hovering on the output port.

Objects with different schemas cannot be connected to each other the same way as you can't connect number to string, because there's no way to match their attributes.

Arrays
Every array has a schema for its element. Like with objects, it may be empty, allowing any element to be in, but it's not a best practice. At the left you can see Array node, it accepts Item Schema as input, so you can use any type as item. The most interesting use-case is to connect an object to it, which allows you to declare an array of objects:

If you click Add Element, you will see that the element is created with a given schema.

Item Schema of an array item has any type, meaning not only objects can form arrays, but all the available types:

Any
Generally, any port doesn't have schema. Any other port can be connected to Any port, which makes it mimic the connected type. For example, at the last screenshot in #arrays section, you can see that Boolean and Number ports were connected to Item Schema port of Any type, and it took their types.
Once connected, Any port receives the type and schema of the connected port.
The way any port is used in the Array Node is quite common, and it allows the node to accept any type (basic one, which has no schema, or something more complicated) to then use not only its schema (like when accepting Array or Object), but also its type, which can be used then to format the output ports. In such cases, the values provided to "/Something/ schema" port are ignored by the node's implementation.
Use cases
There are nodes that accept Schemas in their inputs. Good examples are LLM Call with Structured Output and JSON/YAML Deserialiser.

LLM Call with Structured Output
The LLM Call with Structured Output is a perfect way to control LLM's output and guarantee expected result.

On the example above, you can see the the object with 2 fields was used are schema, the fields are
- Is Greetings, Boolean
- Your Response, Text
It was used as the response Schema, and the LLM filled it correctly without any explanations in the Prompt. You can now use the Boolean isGreetings port for the flow-control.md, for example.
JSON/YAML Deserialiser
Let's imagine we've got the following JSON from some node in the flow:
JSON
{
"name": "laptop",
"price": 1200,
"available": true,
"tags": ["electronics", "computer", "portable"]
},
We now need to work with it in the flow, to check that the price is lower than some other value. To do this, we first need to deserialise this JSON into an object:

In the flow above, we've supplied the JSON/YAML Deserialiser node with our JSON and its Schema in a form of the object at the left. For every attribute, a port was created in the output object of the Deserialiser, so we are free to use the particular values now.