Node bindings

Use this function to customize API nodes and properties. This function complements the Binding dictionary function (GESAPINOD) that specifies how nodes are linked to Sage X3 tables, windows, subprograms, import templates, and other components.

When you create a data model to reference a node, a corresponding node binding record is automatically generated in the Node bindings function (GESANODEB). Any changes to Sage X3 metadata trigger the generation or updating of data in the binding dictionary, after the revalidation of the nodes.

Prerequisites

Follow these steps before setting up node bindings:

  1. Define the relevant API packages in the Packages function (GESAPACK) to structure the nodes dictionary and the GraphQL schema.

  2. Define the nodes in the Data models function (GESAWM) or in the Operations function (GESAPIOPE).

  3. Define the property names in the Tables function (GESATAB).

Screen management

The screen is defined in 5 tabs:

  • The header,

  • The Composite references tab,

  • The Computed properties tab,

  • The Transient properties tab,

  • The Masked properties tab.

Header

This section outlines the key information for node bindings.

Composite references

When a main node is linked to a target node with a 1:1 or 0:1 relationship, you can add the properties of the target node into the main node, defining this as a composite node, to group the properties on a single node.

Computed properties

A computed property is a non-stored or non-persistent property that is primarily associated with a node. It is not linked to a field in the Tables function (GESATB). Instead, its value is calculated or derived based on other properties or calculations.

Computed properties allow you to define a property whose value is dynamically determined at runtime. They are particularly useful when you need to expose calculations or derived values as regular properties of a node, enabling you to encapsulate them within the GraphQL capabilities and logic.

Transient properties

Properties generated as transient on a node are not linked to database fields, unlike regular properties that are bound to table fields in the Tables function (GESATB).

In this section, you can declare the transient properties that will be sent to an API operation for your node.

You can use transient properties to map the technical fields defined in Sage X3 to the API operation (mutation), such as entry transactions or document printing destinations.

Masked properties

In the GraphQL context, non-published properties refer to data elements or entities that exist within the database but are not exposed or accessible to users or applications querying the GraphQL schema.

Non-published properties refer to properties associated with nodes that are not meant to be exposed to end-users or applications interacting with Sage X3. These properties can be used internally within nodes for processing or other operations, but they are not included in the visible GraphQL schema, ensuring they remain hidden from external queries.

Non-generated properties on nodes refer to properties that are explicitly defined as non-generated, rather than those automatically created based on the table definition. Distinguishing between these property types is important for effective data management and for querying nodes.

Specific buttons

General parameters

Error messages

The only error messages are the generic ones.

Tables used

The following tables are implemented by the function:

Table Table description
ANODEBDG [ANODEB] Node binding
ANODCPS [ANODCP] Composite references
ANODCPT [ANODCT] Computed properties
ANODTRANS [ANODTR] Transient properties
ANODPEXCL [ANODEX] Masked properties