Initializing a transaction
A GQL transaction can be initialized either implicitly or explicitly, depending on the implementation and method of invocation.
Implicit transaction initialization
If there is no explicit transaction declaration when executing GQL, the transaction is implicitly initialized by the GQL client.
For example, when using the GQL Playground without an explicit transaction statement, an implicit transaction is automatically declared.
For example, to retrieve nodes by MATCH statement, the following is used:
GQL:
MATCH (n) RETURN n LIMIT 10
The process for sending this query is illustrated in Figure 9.1.

Figure 9.1: Session, transaction, and procedure
Let’s walk through the steps in the process:
- The GQL Playground, acting as a GQL client, creates a session to connect to the GQL service (the graph database).
- Within this session, the GQL Playground initiates a transaction.
- An inline procedure body is...