GraphQL is changing the way modern apps are built

Hasura gives you the goodness of GraphQL without the pain of having to set it up.
Hasura is a fully GraphQL spec compliant server and connects to databases & services to provide a secure and scalable unified GraphQL API.
Queries gif

What is GraphQL?

GraphQL is a specification for how to talk to an API. It’s typically used over HTTP where the key idea is to POST a “query” to an HTTP endpoint, instead of hitting different HTTP endpoints for different resources. GraphQL is designed for developers of web/mobile apps (HTTP clients) to be able to make API calls to fetch exactly the data they need from their backend APIs.

We have tutorials to get you started with your GraphQL journey in your favourite framework / language of choice.

Why GraphQL?

  • ExpandDesigned for modern web/mobile clients.
  • ExpandFetch exactly what you want from the backend.
  • ExpandSchema and type system as a contract.
  • ExpandCommunity tooling (i.e GraphiQL)
  • ExpandDatabase and Language agnostic - use framework of choice.
  • ExpandGraphQL loves JSON.
Why GraphQL
GraphQL improves developer productivity by being a self documenting API

5 Years of GraphQL

2020 represents 5 years on GraphQL! We asked some of GraphQL’s earliest adopters 10 questions about GraphQL & its evolution. Watch the video to know more!
“GraphQL wouldn’t exist without the community of engineers who continue to contribute to make GraphQL what it is today.”
Lee Byron
Lee Byron
Adopting GraphQL in your Tech Stack

GraphQL Server

Hasura is a web application server that gives you GraphQL APIs out of the box, such that you don’t need to build a GraphQL server.
Hasura autogenerates GraphQL API for databases and lets you extend the Graph using Actions.
You can bring in existing GraphQL servers and stitch them together with Hasura using the remote schemas feature, and join data across your database & services using Remote Joins.

Hasura as a high-performance GraphQL Server

  • ExpandHasura compiles a GraphQL query of any length to a single SQL query.
  • ExpandInternally Hasura enriches the GraphQL AST with user given permissions & mapping rules to create an SQL AST.
  • ExpandHasura caches your GraphQL query plan and makes highly optimised database calls.
  • ExpandHasura provides out of the box GraphQL subscriptions that can be consumed at scale.

GraphQL Client

GraphQL requests can be made using your favorite http clients since the underlying request/response format is usually JSON.
But there’s more to a GraphQL client than just making http requests, from caching to making realtime apps easy.
Hasura provides support for all GraphQL Clients, including Relay (preview). There’s a rich ecosystem of GraphQL clients.

Benefits of GraphQL Client

  • ExpandGraphQL Subscriptions & websockets:
    Consuming a realtime API over websockets usually requires a lot of setup. GraphQL Clients like Apollo, Urql make it easy to set it up.
  • ExpandGraphQL Fragments & data co-location:
    Relay uses Fragments to declare data requirements for components, and compose data requirements together. All data dependencies live alongside component definitions and makes it easier to reason about data requirements for UI.
  • ExpandGraphQL Caching:
    The schema and introspection features of GraphQL enables a client to cache responses on the frontend.

GraphQL Community & Ecosystem

GraphQL’s specification has allowed for a rich ecosystem of tooling to be created which are all interoperable, and help to continuously enhance the developer experience around GraphQL. As Hasura is 100% compliant with the GraphQL spec, this entire ecosystem of tooling is usable by our users.

Join the community!

If you need any help with developing on Hasura, the 6000+ member strong Hasura Discord is here to help. Our community members include some very experienced engineers from some of the world’s most exciting companies, and many of them have been using Hasura in Production for a long time.
Hasura icon

GraphQL Foundation

GraphQL Foundation is a neutral foundation founded by global technology and application development companies. Hasura is a founding member of the GraphQL foundation and is working together with other members to form a new, vendor-neutral foundation that will provide unified governance and stewardship for GraphQL.

Hosted under the Linux Foundation, the nonprofit organization enabling mass innovation through open source, the Foundation’s mission will be to enable widespread adoption and help accelerate development of GraphQL and the surrounding ecosystem. Read more on recent announcements.
GraphQL foundation
Breaking down GraphQL on the client side

GraphQL Queries

  • ExpandHasura gives you powerful GraphQL queries out of the box.
  • ExpandAsk what you want and get result in same shape.
  • ExpandFetch multiple resources at a time.
  • ExpandPagination, filter and sort using arguments for more granular data fetching.
GraphQL Queries

GraphQL Mutations

  • ExpandManipulate data using mutations.
  • ExpandUpdate single or multiple objects with any level of nesting.
  • ExpandConditional updates or deletes using arguments.
  • ExpandMake upsert operations on conflict to simplify app logic.
  • ExpandReturn data back to the client post the mutation
GraphQL Mutations

GraphQL Subscriptions

GraphQL Subscriptions

GraphQL vs REST

  • ExpandSingle endpoint in GraphQL vs multiple resources in REST.
  • ExpandGraphQL has a schema and type system. REST doesn’t enforce any type system.
  • ExpandAvoid over-fetching with GraphQL by specifying exactly what you want
  • ExpandBetter caching on the client side due to the type system compared to REST.
  • ExpandRead more - GraphQL vs REST
GraphQL vs REST

GraphQL N+1 Problem

Though GraphQL brings all the goodness mentioned above,it is prone to the N+1 problem.
We are fetching authors and their articles. Now for each author query, there are N articles being fetched. So total round trips become N+1 and would be a huge bottleneck.
Hasura mitigates the N+1 problem by being a compiler. All your queries to the database are compiled to a single SQL query and reduces the number of hits to the database.
GraphQL N+1 Problem

GraphQL & Microservices: Use Remote Schemas & Remote Joins

Hasura provides a simple way to bring the power of GraphQL to your microservices architecture.
Hasura addresses challenges around dynamically building a stable GraphQL API & performance. It is designed to integrate with emerging cloud-native patterns for building microservices.
Hasura provides an authorisation engine that allows for securing the unified GraphQL API, including a powerful role, attribute and rule based access control.
GraphQL with Microservices

GraphQL with Serverless

In Hasura, business logic workflows in APIs or serverless functions are going to be event driven. Hasura also provides a way to create custom GraphQL mutations which are internally converted to events and delivered to serverless functions in an event-driven way. This makes it possible to integrate and migrate to event-driven business logic seamlessly.
Read more about 3factor app architecture.
GraphQL with Serverless

GraphQL Federation

GraphQL Federation is an approach that lets you consolidate multiple schemas and APIs into a unified API.
Hasura lets you join data across tables in databases and remote data sources. (Available in preview). The unified API might be required for a team that has multiple sources of data for their application or might be a unified GraphQL API across various teams maintained by a central data API team in the organisation.
GraphQL Federation


GraphQL FAQs

What is GraphQL?
GraphQL is a query language for APIs. GraphQL is designed for developers of web/mobile apps (HTTP clients) to be able to make API calls to fetch the data they need from their backend APIs conveniently. Learn more here
What is the difference between GraphQL vs REST?
GraphQL is a query language that works on a single endpoint compared to multiple Resources in a REST API. GraphQL has a schema and type system while REST doesn’t enforce any type system. Read more about GraphQL vs REST
What is GraphQL used for?
GraphQL is used on the client to ask exactly the data required efficiently. GraphQL on the server resolves the query and returns only the data asked and nothing more.
Is GraphQL a database?
No. GraphQL is just a query language for APIs. It is database agnostic. The GraphQL server can query any database and any APIs.
Is GraphQL replacing REST?
GraphQL can be considered an alternative to REST, but it doesn't replace REST altogether. In fact GraphQL and REST can co-exist in the stack, where REST APIs are abstracted behind a GraphQL server.
Does GraphQL use HTTP?
GraphQL API is typically served through an HTTP endpoint. But it is protocol agnostic and can use different protocols for different use cases. For example, websockets are used for GraphQL subscriptions to consume realtime data.

Hasura FAQs

What is Hasura?
Hasura is an open source GraphQL service that connects to your databases & microservices and auto-generates a production-ready GraphQL backend.
What databases does Hasura support?
Postgres and its flavors (Timescale, Yugabyte). We are planning to launch support for more databases soon, watch this space
Does Hasura let me customize the GraphQL server?
Hasura allows customization and extension of the auto-generated CRUD APIs through Remote Schemas (bringing in external GraphQL servers), Actions (mapping GraphQL types to REST APIs) and through event system.
Our events and conferences

Join our events and learn how our users are leveraging GraphQL

Upcoming Events
Join us for a livestreamed event with core contributors and authors of various libraries in the GraphQL Community.
Community call banner
Hasura Community Call
Dots9:00 am PT
End of the Year Community Call
Join our monthly call and stay up-to-date on all things Hasura.
Join us for a livestreamed event with core contributors and authors of various libraries in the GraphQL Community.
Join our monthly call and stay up-to-date on all things Hasura.