Nov 18, 20268 min read

Hasura Alternatives in 2026

Where to go when Hasura's generated GraphQL API stops fitting: a GraphQL server you write with built-in infrastructure, PostGraphile, Supabase, AWS AppSync, or a hand-rolled gqlgen service.

Illustration for Hasura Alternatives in 2026

Hasura made a strong first impression on a lot of teams: point it at Postgres, track some tables, and a typed GraphQL API with subscriptions and row-level permissions appears in minutes. As the API grows, business logic moves into Actions and remote schemas that call your own services, permissions live in metadata that is hard to read outside the console, and the v3 move to DDN brought a new metadata format, a new CLI and per-model pricing.

In June 2025 Hasura shifted its focus to PromptQL, its AI data product, while saying DDN and v2 would continue to be hosted and maintained. If you are rethinking the GraphQL layer anyway, the options below cover generated APIs, platform-bundled GraphQL and writing the server yourself.

Hasura alternatives at a glance

ApproachWhere it runsBusiness logicPermissionsBest for
EncoreGraphQL server you write (gqlgen), with built-in infrastructureYour AWS or GCP accountIn resolvers, next to the schemaAuth handler and resolver checksTeams whose API is mostly custom logic
PostGraphileGraphQL generated from Postgres schemaYour Node.js serverPostgres functions, pluginsPostgres RLS and rolesClosest open source drop-in for generated GraphQL
Supabasepg_graphql extension inside hosted PostgresSupabase's cloudPostgres functions, Edge FunctionsPostgres RLSTeams that want database, auth and GraphQL in one platform
AWS AppSyncManaged GraphQL with resolversAWSJavaScript resolvers, LambdaIAM, Cognito, API keysAWS-native teams with DynamoDB or Aurora
Hand-written servergqlgen, Apollo Server or similarWherever you deploy itYour codeYour codeFull control, you own the infrastructure
HasuraGenerated GraphQL with metadataHasura DDN or self-hostedActions, connectors, remote schemasMetadata role rulesFast CRUD APIs over many sources

1. Encore

Encore

Encore is a backend framework with built-in infrastructure, and its Go docs use gqlgen behind a raw endpoint for GraphQL. You write the schema and resolvers; the database, topics and cron jobs those resolvers use are declared in the same code. encore run starts Postgres locally, and on deploy Encore provisions Cloud SQL or RDS, Pub/Sub or SNS and SQS in your own GCP or AWS account. It does not generate a schema from your tables, which is the trade: you write each resolver, and every query clients can run is one you chose.

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

The schema is plain SDL, and gqlgen generates typed resolver stubs from it:

type Query { order(id: ID!): Order } type Mutation { cancelOrder(id: ID!): Order! } type Order { id: ID! status: String! totalCents: Int! }

The service exposes gqlgen's handler on a raw endpoint, and the resolvers query Encore's database and publish to a topic, which replaces a Hasura event trigger. A migration declares the orders table and the outbox the resolver writes in the same transaction:

-- orders/migrations/1_orders.up.sql CREATE TABLE orders ( id TEXT PRIMARY KEY, customer_id TEXT NOT NULL, status TEXT NOT NULL, total_cents INTEGER NOT NULL ); CREATE TABLE cancellation_outbox ( order_id TEXT PRIMARY KEY REFERENCES orders (id) );
package graphql import ( "context" "errors" "net/http" "encore.app/graphql/generated" "encore.app/graphql/model" "encore.dev/beta/auth" "encore.dev/beta/errs" "encore.dev/pubsub" "encore.dev/storage/sqldb" "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/handler/transport" ) var db = sqldb.NewDatabase("orders", sqldb.DatabaseConfig{Migrations: "./migrations"}) type OrderCancelled struct { OrderID string `json:"order_id"` } var OrdersCancelled = pubsub.NewTopic[*OrderCancelled]("orders-cancelled", pubsub.TopicConfig{ DeliveryGuarantee: pubsub.AtLeastOnce, }) //encore:service type Service struct{ srv *handler.Server } func initService() (*Service, error) { srv := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: &Resolver{}})) srv.AddTransport(transport.POST{}) return &Service{srv: srv}, nil } //encore:api auth raw path=/graphql func (s *Service) Query(w http.ResponseWriter, req *http.Request) { s.srv.ServeHTTP(w, req) } type Resolver struct{} // mutationResolver is generated by gqlgen in schema.resolvers.go; this is the method you fill in. func (r *mutationResolver) CancelOrder(ctx context.Context, id string) (*model.Order, error) { uid, _ := auth.UserID() o := &model.Order{ID: id} tx, err := db.Begin(ctx) if err != nil { return nil, err } defer tx.Rollback() err = tx.QueryRow(ctx, ` UPDATE orders SET status = 'cancelled' WHERE id = $1 AND customer_id = $2 AND status = 'pending' RETURNING status, total_cents`, id, string(uid)).Scan(&o.Status, &o.TotalCents) if errors.Is(err, sqldb.ErrNoRows) { err = tx.QueryRow(ctx, ` SELECT o.status, o.total_cents FROM orders o JOIN cancellation_outbox x ON x.order_id = o.id WHERE o.id = $1 AND o.customer_id = $2`, id, string(uid)).Scan(&o.Status, &o.TotalCents) if errors.Is(err, sqldb.ErrNoRows) { return nil, &errs.Error{Code: errs.NotFound, Message: "no pending order with that id"} } else if err != nil { return nil, err } } else if err != nil { return nil, err } else if _, err := tx.Exec(ctx, ` INSERT INTO cancellation_outbox (order_id) VALUES ($1) ON CONFLICT DO NOTHING`, id); err != nil { return nil, err } if err := tx.Commit(); err != nil { return nil, err } if _, err := OrdersCancelled.Publish(ctx, &OrderCancelled{OrderID: id}); err != nil { return nil, err } _, _ = db.Exec(ctx, `DELETE FROM cancellation_outbox WHERE order_id = $1`, id) return o, nil }

The status change and an outbox row commit together, so a retry of the same mutation can publish a leftover event if the first publish failed. The customer_id = $2 clause is the permission rule, in the query where you can test it, rather than a _eq: X-Hasura-User-Id filter in metadata. The auth endpoint tag requires an auth handler, which plays the role of Hasura's JWT or webhook mode. Encore provisions an IAM role for the service, or a service account on GCP.

For a coding agent, a resolver is ordinary Go it can read, change and run against local Postgres, which is easier to get right than editing permission YAML that only takes effect inside a running engine.

Best fit: teams whose Hasura setup is mostly Actions and remote schemas already, who want the GraphQL layer and its infrastructure as code in their own cloud account.

2. PostGraphile

PostGraphile generates a GraphQL API from your Postgres schema, using tables, views, functions and foreign keys, and relies on Postgres roles and row-level security for permissions instead of its own rule system. Version 5, rebuilt on the Grafast query planner, reached its stable 5.0.0 release after a long beta, and the core is MIT licensed. It runs as a Node.js server or middleware you host yourself.

Compared with Hasura, more of your design moves into the database: computed fields are SQL functions and permissions are RLS policies, which suits teams comfortable writing SQL and avoids a separate metadata layer.

Best fit: teams that want generated GraphQL over Postgres to keep working with the least change, and are comfortable putting permissions in RLS.

3. Supabase

Supabase bundles hosted Postgres with auth, storage, an auto-generated REST API and GraphQL through the pg_graphql extension, which resolves queries inside Postgres itself. Permissions are Postgres RLS policies, and custom logic goes into SQL functions or Edge Functions. Plans start free, with Pro at $25 a month plus usage.

Compared with Hasura, GraphQL is one feature of a platform rather than the product, and subscriptions come from Supabase Realtime rather than GraphQL subscriptions.

Best fit: teams moving the database as well as the API layer, who want auth and storage in the same platform.

4. AWS AppSync

AppSync is AWS's managed GraphQL service, with resolvers written in JavaScript or backed by Lambda, direct data sources for DynamoDB, Aurora through the Data API, OpenSearch and HTTP, and real-time subscriptions over WebSockets. Auth integrates with IAM, Cognito, OIDC and API keys. Pricing is per million query and mutation operations plus real-time connection minutes.

Compared with Hasura, nothing is generated from your schema by default; you wire each field to a data source, which is closer to writing your own server inside AWS's console and SDKs.

Best fit: AWS-native teams already on DynamoDB or Aurora who want managed GraphQL with AWS auth.

5. A hand-written GraphQL server

The do-it-yourself path is a GraphQL library, such as gqlgen in Go or Apollo Server in Node.js, deployed like any other service. The code is the same as the Encore example above; the difference is everything around it. You run Postgres locally with Docker Compose, write the Cloud Run or ECS service, the database, the queue, the IAM bindings and the secrets in Terraform, and maintain a CI pipeline that deploys them.

A minimal production setup on AWS is an ECS service behind an ALB, an RDS instance, an SNS topic with an SQS queue for the cancelled-order event, a task role with sns:Publish on that topic, and a Secrets Manager entry for the database password, each declared and reviewed separately from the resolver that uses it.

Best fit: teams with an existing platform and Terraform setup who only need a GraphQL library.

How to choose

If your Hasura usage is mostly generated CRUD and you want that to keep working, PostGraphile is the closest move, and Supabase is the option when you also want a hosted database platform. If you are on AWS and want a managed service, AppSync fits. If most of your API is already custom logic behind Actions, write the server: with Encore, the resolvers, database and events are one codebase deployed to your own AWS or GCP account, and with a bare library you add the infrastructure yourself.

Frequently asked questions

What is the best alternative to Hasura?

PostGraphile is the closest open source replacement for an auto-generated GraphQL API over Postgres. Supabase adds pg_graphql inside a hosted Postgres platform. AppSync suits AWS-native teams. If most of your logic already lives in Actions and remote schemas, a GraphQL server you write yourself, for example with gqlgen, is usually the better fit.

Is Hasura still open source?

Yes, for the engine. The Hasura v2 GraphQL Engine is Apache 2.0, and the v3 engine and data connectors are Apache 2.0 as well. The DDN CLI, console and control plane are proprietary, so self-hosting v3 means running the engine without the hosted build and schema registry features.

How do I migrate from Hasura to my own GraphQL server?

Export the GraphQL schema Hasura generates, decide which queries clients use from logs, and implement those as resolvers first. Move Hasura permission rules into resolver checks or Postgres row-level security, and replace event triggers with a transactional outbox or Pub/Sub. Run both behind the same endpoint path during the cutover.

Can I build a GraphQL API with Encore?

Yes. Encore's Go docs use gqlgen behind a raw endpoint, with resolvers that query an Encore-managed Postgres database and publish to Pub/Sub. encore run starts Postgres locally, and on deploy the database and topics are provisioned in your own AWS or GCP account.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders