Tutorial: Get instant GraphQL APIs on BigQuery with Hasura
Tags: graphql, bigquery, api
Published: 2021-09-24 13:00:06

---
title: Tutorial: Get instant GraphQL APIs on BigQuery with Hasura
published: true
date: 2021-09-16 10:49:21 UTC
tags: GraphQL,BigQuery,APIs
canonical_url: https://hasura.io/blog/tutorial-get-instant-graphql-apis-on-bigquery-with-hasura/
---

## Introduction
 ![Tutorial: Get instant GraphQL APIs on BigQuery with Hasura](https://hasura.io/blog/content/images/2021/09/instant_grahql_bigquery.png)

We recently launched BigQuery support for Hasura (to get a full list of supported databases, look [here](http://hasura.io/graphql/databases).

In this guide, we’ll show how to connect BigQuery to Hasura Cloud, set default limits, and run a few queries.

This guide will follow in two parts, feel free to skip to the part that is more interesting for you.

- Part I: Connecting BigQuery (you are here)
- Part II: Building a Dashboard with BigQuery, Optimizing Performance

To get started with Hasura on BigQuery you can head straight to the documentation:“[Getting started with BigQuery](https://hasura.io/docs/latest/graphql/core/databases/bigquery/getting-started.html)”.

## BigQuery with Hasura

BigQuery provides a rich ecosystem of utilities and services for wide-column datasets that have made it a market leader in use-cases that need to track many points of detail with high-transaction counts.

Hasura excels in the space between BigQuery and the front-end architects. Hasura makes really fast, dynamic, APIs, provides descriptive access controls, and if you are using Hasura Cloud, enables automatic rate limiting, caching query depth controls, and more.

Combining Hasura with BigQuery provides a fast and descriptive API for BigQuery that can be meshed with the rest of your data-layer, opening up a wider set of use-cases for the massive amounts of data that BigQuery typically stores.

### Features of note are:

- Dynamic GraphQL APIs that are generated based on the model in your database.
- Fine-grained authorization controls that ensure appropriate data ownership practices.
- An @cache directive for annotating queries out of BigQuery for instant cache.
- Setting API rate limits and query depth limits to ensure efficient and affordable database utilization.
- Allow-lists that let you observe your actual query usage, and save those to an approved list, preventing unintended use of the application.

Utilizing these features you free up your developers to explore the dataset and surface new and creative ways to work with data you have while still maintaining good data hygiene, ownership hierarchy, and privacy best practices. Write less proxy code and more domain code by integrating BigQuery with Hasura.

Early users of the BigQuery integration have used Hasura to build instant, dynamic APIs on top of BigQuery as well as speed up application development timelines. With Hasura, frontend developers on the team are able to do the work of data engineers thereby decreasing the overall time to market.

## Connecting the APIs

In this first video, we’ll walk through connecting BigQuery to Hasura, tracking tables, defining custom relations and setting reasonable security defaults. In the followup video, we’ll look at accessing that content from a front-end application.

<iframe width="200" height="113" src="https://www.youtube.com/embed/uyLhzu0GcAw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>

## Closing

In the next video, we'll cover adding permission controls and query optimizations as we load the data into a front-end application.