I am writing a Grakn driver for Haskell right now.
So far I have been able to get the Administration functions to work;
However, I experience some troubles getting the Transaction stuff working:
main :: IO () main = do res <-(tryTx `withSessionFor` (Keyspace "Test")) `runIn` defaultGraknSettings print res
tryTx simply sends a transaction open request.
After sending it, the Grakn server responds with this:
[TXN03] Invalid Transaction Operation: The transaction has not been opened yet, so the only allowed operation is to open it.
If I understand the protocol correctly this should work:
- Establish a connection to the grakn server
- open a session with an existing keyspace
- open a transaction in this session
- do other stuff
- commit transaction
- close session
this is essentially what I am trying, but I couldn’t figure where I went astray.
i would be glad for some guidance in this matter.