The way Dgraph works needs an extra transaction. Cuz the data needs to be distributed(some cases replicated) across the cluster. Without that confirmation, you can’t query the data.
In theory, would be possible to get the data from the cluster “memory”(Similar to a “MEMPOOL” from Bitcoin core). Just, in theory, cuz in practice that would be a bit complicated to implement(need more changes in the procedures) BUT in the end, there’s no usability to support such idea. As you can just verify the data before sending it to the transaction or just commit it.
Thank you for you answers, and I have one more question.
Suppose I added 2 nodes using the same transaction, and need to add 3-rd node that has links to other 2 nodes.
Does this require to commit first 2 nodes before I can add 3-rd node that has links to them?
Nope, you can do as many links and additions in a single transaction you wish before committing. You have to pay attention to existing UIDs and use the same blank nodes in the transaction context.