Graphql Get Ticket State

Not sure about that request.
With samba v5 you have scripts which use jscript (ms java as I understand it).
You can execute script with action or the {CALL:x.y} function.
If you want a topic on scripts see my hotel PMS intergration topic where I did a full intergration all from samba side using PMS systems API.

I had never used java/jscript before this project so starts slow but covers what you need.