Add 3rd party Fetch and Callback support

FQL is growing to a robust database language that can make ORM and the backend for many use cases obsolete. One major step in that direction would be providing support to receive and make API calls inside functions.

With that, it would become easy to query for additional information needed in the database e.g., if I do the identity management with Fauna and a social provider like GitHub. Instead of having a dedicated function for GitHub running on Cloudflare Workers or any other traditional Backend, I would do everything in Fauna.
With that, I would reduce the complexity of my App and increase the performance (Instead of having communication between
Client -> Backend -> GitHub -> Backend -> Fauna -> Backend -> Client (6 hops)
we can reduce it to
Client -> Fauna -> GitHub -> Fauna -> Client (4 hops)).
A similar performance boost could be probably reached for a lot of other use cases.

In that context, it would probably also make sense to have support for environment variables to store secrets for external APIs.

Hi @Mike ,

We have been giving this kind of functionality some thought recently. Specifically, the ability to trigger an HTTP request to a external service, and then persist the response back to Fauna. I’ll add this particular case to the set of use cases we are considering for this feature. Thanks for this suggestion.

More suggestions and input from users in this area is, as always, welcome and appreciated.

1 Like