Sun. Nov 28th, 2021




Graphql: hasura opens in version 2 for new databases and speaks rest

Hasura has released version 2.0 of the GraphQL engine of the same name. After the processor was designed for PostgreSQL, the release aims at general database connectivity. At the start there are interfaces for SQL-Server and BigQuery. New interfaces should be able to be developed in a short time. In addition, the engine can now address multiple databases simultaneously.

More than a database

The first release of the engine had appeared in 2018 and had focused exclusively on a direct connection to PostgreSQL databases. According to its own statements, the team initially wanted to concentrate on the ecosystem and the community of the open-source database.

Since then, there have been two fundamental requests from the user base, especially in the enterprise environment: First, multi-tenant connectivity of multiple instances, and second, integration of different workloads, taking into account, for example, the different requirements for processing time series versus those with coarse transaction volumes.

Version 2.0 of the GraphQL engine can manage several databases simultaneously, both as a single instance and in a cluster. New database sources can probably be added during operation.

Beyond PostgreSQL

In the course of the development of the current release the team has rewritten the query compilation pipeline in a way that it should provide a generalization for arbitrary databases. The background is the demand to manage legacy data, which is often not stored in PostgreSQL databases.

The new version of the engine can handle REST queries alongside GraphQL. It also works with SQL Server and BigQuery.

At launch, the Hasura Engine 2 offers.0 a connection to SQL Server and Google’s data warehouse BigQuery. That no general interface exists, Hasura justifies with not wanting to bring all data base engines on a common denominator, but to use instead the respective strengths.

As a result, the company is relying on open-source development of additional interfaces tailored to specific databases. Interested parties should submit their requests directly through the GitHub repository, which also provides guidance on how to co-develop on the project.

Endpoints for REST

Even though the engine is designed for GraphQL, it opens up for REST in the current release. This should prevent organizations from having to deploy and manage two different engines to accept GraphQL queries on the one hand and provide a separate REST API for clients without GraphQL capabilities on the other hand.

Developers can now create REST endpoints based on GraphQL templates. RESTful queries are converted by the Hasura Engine into a parameterized GraphQL query. The GitHub repository has the specification and examples for setting up REST endpoints with Hasura.

Further innovations to the GraphQL Engine 2.0 like the newly introduced remote joins can be found on the Hasura blog.




Leave a Reply