What's the most performant way for my Firebase app to connect to a TigerGraph cloud instance?

What’s the most performant way for my Firebase app to connect to a TigerGraph cloud instance? REST API, Firebase function, or some other way? Step by step instructions would really help. Thank you for reading my question!